tomcat-users mailing list archives

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

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:
	<Context>
		<WatchedResource>WEB-INF/web.xml</WatchedResource>
	</Context>

3) Tomcat 5.5\webapps\store\META-INF\context.xml is:
	<Context path="/abc" docBase="store" debug="5" reloadable="true"
crossContext="true">
		<Resource name="jdbc/storeDB" auth="Container
type="javax.sql.DataSource" username="sa" password="*****"
driverClassName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=StoreTest;Select
Method=cursor" maxActive="8" maxIdle="4"/>
	</Context>

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

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 [mailto:Chuck.Caldarale@unisys.com] 
Sent: Tuesday, September 13, 2005 3:59 PM
To: Tomcat Users List
Subject: RE: Can't change servlet path

> From: David Thielen [mailto:david@windward.net] 
> 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:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html

(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
host
    * 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


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message