tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <>
Subject Re: What about the Context tag?
Date Fri, 17 Jan 2003 16:23:24 GMT
Hello Steve,

It is fine to edit server.xml, but it might be easier to use a Context
Configuration File.  See the current webapps directory in any recent
Tomcat release such as 4.1.8.  Notice the admin.xml and manager.xml
files?  Just make a [myapp].xml file and add your <Context ...> tag
with all nested tags needed to it.  Write the path as whatever context
path you want to access your app (eg... path="/myapp").  Then, for the
docBase, use the directory or .war file that your app is being
deployed from.  For instance docBase="myapp" or docBase="myapp.war".
The latter case will force the app to be served directly from the .war
file where the former case forces it to be served from the directory.

Stop Tomcat, put both your [myapp].xml file and the .war or directory structure of
your app in webapps, and start Tomcat.  Everything should work fine.


Friday, January 17, 2003, 12:49:00 AM, you wrote:

SRB>  Hello there, newbie finds himself in some need of help with using the <Context>
SRB> tag!! I happen to have a server-side Java programming book that tells the reader
SRB> to edit this tag in the server.xml file with the specific context path for the
SRB> servlet to be seen in the browser, HOWEVER I have noticed that some in this group
SRB> have said that this whole file should just be left alone, that Tomcat could
SRB> somehow "magically" find the correct path for the servlet! Who is right about this
SRB> anyway?!   

SRB> __________________________________________________
SRB> Do you Yahoo!?
SRB> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.

SRB> --
SRB> To unsubscribe, e-mail:   <>
SRB> For additional commands, e-mail: <>

Best regards,

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

View raw message