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

I'm reposting this message since I still haven't received an answer:

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
 

Reply via email to