tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Thielen" <>
Subject RE: Can't change servlet path
Date Tue, 13 Sep 2005 23:33:12 GMT

I am using Tomcat 5.5 (which is really nice).

1) I have no <Context> nodes in server.xml

2) Tomcat 5.5\conf\context.xml is:

3) Tomcat 5.5\webapps\store\META-INF\context.xml is:
	<Context path="/abc" docBase="store" debug="5" reloadable="true"
		<Resource name="jdbc/storeDB" auth="Container
type="javax.sql.DataSource" username="sa" password="*****"
Method=cursor" maxActive="8" maxIdle="4"/>

Yet http://localhost:8080/abc fails and http://localhost:8080/store

I've read all the docs and it seems to me this is supposed to work.

What am I missing????

Thanks - dave

-----Original Message-----
From: Caldarale, Charles R [] 
Sent: Tuesday, September 13, 2005 3:59 PM
To: Tomcat Users List
Subject: RE: Can't change servlet path

> From: David Thielen [] 
> Subject: Can't change servlet path
> I have tried the following in context.xml (in 
> webapps/store/WEB-INF and META-INF):

Please read the very explicit doc:

(Since you didn't bother to tell us which Tomcat version you're using,
you'll need to adjust the above URL appropriately.)

In particular, the above says:

"In addition to nesting Context elements inside a Host element, you can
also store them:
    * in the individual $CATALINA_HOME/conf/context.xml file: the
Context element information will be loaded by all webapps
    * in the individual
$CATALINA_HOME/conf/[enginename]/[hostname]/context.xml.default file:
the Context element information will be loaded by all webapps of that
    * in individual files (with a ".xml" extension) in the
$CATALINA_HOME/conf/[enginename]/[hostname]/ directory
    * if the previous file was not found for this application, in
individual file at /META-INF/context.xml inside the application files"

"Please note that for tomcat 5, unlike tomcat 4.x, it is NOT recommended
to place <Context> elements directly in the server.xml file.  Instead,
put them in the META-INF/context.xml directory of your WAR file or the
conf directory as described above."

If you are using 5.5, also note the following for the path attribute:

"The value of this field must not be set except when statically defining
a Context in server.xml, as it will be infered [sic] from the filenames
used for either the .xml context file or the docBase."

 - Chuck

MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message