You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ken Ramirez <kr...@mastermind.com> on 2002/03/22 14:23:28 UTC

DocBase, Path, and WARs

I have a quick question regarding WARs and Tomcat 4.x, which I hope
someone can give me a straight answer for:

I created a WAR file containing a servlet, and a few JSPs.  I put all of
the necessary stuff into the web.xml, and created the appropriate
structure in the WAR file.  According to the TOMCAT documentation, I
need to specify a context as follows:

<Context debug="0" docBase="MyWebApp.war" path="/MyWebApp"
reloadable="true" />

However, this did not work and TOMCAT did not expand the WAR file when I
started TOMCAT up.  After messing around with it for a bit, I discovered
that the following finally got it to work:

<Context debug="0" docBase="MyWebApp" path="/" reloadable="true" />

In fact, I even tried leaving the docBase empty "" and it still expanded
the WAR file when TOMCAT started up.

What gives?  I guess I don't have a solid understanding of docBase and
path yet.  I thought that the purpose of creating a Context entry was to
provide the application with its own private context at runtime?  If
this is so, who's context is this application running under.  It
certainly doesn't appear to be creating a context for MyWebApp.

Ken Ramirez - Principal/CTO
kramirez@mastermind.com
  
Master-Mind Consulting Services
http://www.mastermind.com <http://www.mastermind.com/> 
Ph - 570-688-9600
Fx - 208-275-2301