The WAR file doesn't stay packed. It is simply a deployment mechanism.
At startup Tomcat will take any WAR file that it finds in the webapps 
directory, and unpack it
into a directory which has the name of the WAR file.
For example, lets say that you have an existing context called "oldContext".
If you navigate to that directory, you can then jar everything up into a 
WAR file using
the command "jar cvf newContext.war *".
If you take "newContext.war" and move it down into the webapps directory,
and then restart Tomcat, you will end up with a "newContext" directory
within the webapps directory. Within the webapps directory, you should see:

newContext.war
newContext directory
oldContext directory

Nothing prevents your clients from making changes to files that were 
previously located within the WAR file.
Bear in mind that the deployment only works if there was no pre-existing 
"newContext"
directory on the target machine.
If you previously installed release 1 of your application, and now you want 
to install release 1.1
with the same context name, you will
need to remove the context directory tree if you are deploying a WAR file.

Ed

At 02:38 PM 4/18/01 +0100, you wrote:
>You mean that you deploy servlets on customers machines? I'm not sure how 
>easy it is to access files outside of the WAR file. I suspect you'd have 
>to edit the tomcat.policy file to relax the security sandbox that servlets 
>run it. Byd efault I don't think you can access anything outside the 
>servlets web context. Alternatively you could deply the webapp unpacked 
>(e.g. not use the WAR file). As far as I can see the only benifits of 
>using a .WAR file is it looks a little neater, hides some of the internals 
>and makes deployment a little easier.
>
>sam
>----- Original Message -----
>From: <mailto:[EMAIL PROTECTED]>Rida Ligurs
>To: <mailto:'[EMAIL PROTECTED]'>'[EMAIL PROTECTED]'
>Sent: Wednesday, April 18, 2001 1:56 PM
>Subject: RE: Servlet jar files
>
>I was also thinking of using WAR files, but didn't know where to put my 
>properties files.  I don't think I wan't them in the WAR because the 
>customer will need to edit them.  Where should they go?

Reply via email to