Correction: context.xml belongs in META-INF of the war archive.
Henry McClain wrote:
There are two pieces of information about the Context file while
deploying
your application as a WAR that the Tomcat documentation fails to make
absolutely clear:
1) the Context file name must be "context.xml"; do not attempt to name it
anything else.
2) put the file in the /WEB-INF folder of the WAR
The file will be extracted and the name changed automatically by the
Tomcat
engine. than that, what Mr. Stepanenko gave you is relatively
identical to what I have in my Context file.
--
H
9/23/06, Andrew Stepanenko <andrew.stepanenko (AT) gmail (DOT) comwrote:
>>
>Hello,
>>
>looks like the docs I gave a link to describe the old approach, sorry.
>Here is what I have in my context.xml:
>>
>
><!-- The contents of this file will be loaded for each web
>application
><Context path="" docBase="/"
>debug="1" reloadable="true">
>>
><!-- Default set of monitored resources
><WatchedResource>WEB-INF/web.xml</WatchedResource>
>>
><Resource name="jdbc/unfasHB" auth="Container" scope="Shareable"
>type="javax.sql.DataSource"
>factory=""
>>
>
>url=";characterEncoding=UTF-8&characterSetResults=UTF-8"
>>
>driverClassName="com.mysql.jdbc.Driver"
>username="andrews"
>password="xxx"
>maxIdle="5"
>maxActive="50"
>autoReconnect="true"
>/>
></Context>
>
>>
>also, the format of <Resourcehas been changed. Now, all
>configuration data should be provided as attributes and not nested
>tags.
>>
>Regards,
>Andrew Stepanenko,
>http://unf.tane.edu.ua
>>
>9/23/06, Alan Chandler <alan (AT) chandlerfamily (DOT) org.ukwrote:
>Saturday 23 September 2006 09:57, Andrew Stepanenko wrote:
>Hello,
>>
>there is a difference between how resources are defined in 5.0 and
>5.5. In 5.0 you could provide your resource definitions right in the
>server.xml, but in 5.5 you need to create a separate context.xml
>file
>($CATALINA_HME/conf/Catalina/<hostname>/context.xml) and put
>resource
>definitions there.
>See this link:
>
>>
>I also had this problem when migrating from 5.0 to 5.5. After I
>defined a separate context.xml it started to work again.
>>
>The docs seem very vague on this issue, but it does imply that I
>could
>still
>use $CATALINA_HME/conf/server.xml
>>
>question that isn't answered in the docs is what the root element
>should
>be - the best seems to be the example for accessing a database, and
>even
>there it puts <Context >
>>
>I tried with context.xml in the directory you mentioned and it said it
>couldn't find the webapp "context", so I renamed it to my application
>and
>tried again. But it didn't work.
>>
>So still stumped
>>
>--
>Alan Chandler
>
>>
>>
>
>To start a new topic, e-mail: users (AT) tomcat (DOT) apache.org
>To unsubscribe, e-mail: users-unsubscribe (AT) tomcat (DOT) apache.org
>For additional commands, e-mail: users-help (AT) tomcat (DOT) apache.org
>>
>>
>>
>>
>--
>Andrew Stepanenko,
>Ph.D. student,
>Dept. of Information Computing Systems and Control,
>Web:
>Software engineer,
>Ukrainian-Dutch Faculty of Economics and Management
>Ternopil State Economic University
>Shevchenko Street 9, 24-25
>Ternopil, 46000 UKRAINE
>Tel: +38 (0352) 43 52 41
>fax: +38 (0352) 43 52 45
>Web: http://unf.tane.edu.ua
>>
>
>To start a new topic, e-mail: users (AT) tomcat (DOT) apache.org
>To unsubscribe, e-mail: users-unsubscribe (AT) tomcat (DOT) apache.org
>For additional commands, e-mail: users-help (AT) tomcat (DOT) apache.org
>>
>>
>
>
To start a new topic, e-mail: users (AT) tomcat (DOT) apache.org
To unsubscribe, e-mail: users-unsubscribe (AT) tomcat (DOT) apache.org
For additional commands, e-mail: users-help (AT) tomcat (DOT) apache.org