You, no doubt, are defining a <Context> for your app. Don't specify that and you will get the default behavior of the .war's unpacking. Whenever you specify a <Context> for your app, Tomcat will not unpack you .war file for you. For instance, let's say you have...


myapp.war

<Context path="/myapp" docBase="myapp">


Tomcat matches up that Context entry to your .war file based on the docBase name being the base name for the .war file. It, then ignores that .war file for unpacking. You can do one of two things...


1. Unpack the .war yourself using the "jar" command or any program that deals with .zip files.
2. point to docBase="myapp.war" instead of a directory. Now you don't have to unpack and your app will just work. The downside is that you have no file system access to the contents of your context. But you shouldn't count on file system access to your context anyway based on what the servlet spec says.


Jake

At 08:36 AM 3/17/2003 -0600, you wrote:
I have created a war file primarily as a container for a group of servlets.
Strange thing is that it is not being unpacked by Tomcat 4.0.6 even though i
have set unpackWAR to true and if I unpack it manually it just extracts the
WEB-INF and related files to the webapps directory and does not create the
root directory from the name of the archive.

What am I doing wrong?

Thanks,
-Mark

Reply via email to