tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gnath <>
Subject Re: Cannot make war file as default app
Date Mon, 15 Aug 2011 17:20:21 GMT
Thanks Chris, for your answers.

My understanding was that tomcat figures out the changes in the re-deployed war file and starts
to explode it in order to overwrite the existing exploded directories in order to serve the
changes in war file. But it looks like it does not overwrite the exploded folders. 

I knew that deleting the work directory and webapps exploded directories before every deployment
works without any problem. One easy solution i see is why not just use exploded directory
structure for deployment instead of war file. Then it will solve my issue as  i saw it working..
Just was curious to understand tomcat behavior with war files.

Thanks to all for all your replies.


From: Christopher Schultz <>
To: Tomcat Users List <>
Sent: Monday, August 15, 2011 8:21 AM
Subject: Re: Cannot make war file as default app

Hash: SHA1


On 8/12/2011 4:59 PM, exquisite wrote:
> Now when i renamed my war to ROOT.war and drop it in webapps folder 
> (without any context in server.xml), it deploys fine for the first
> time as the root app (Creates a ROOT folder in webapps),  but if i
> make any change to any of my jsps and drop the new ROOT.war file, it
> says its deploying ROOT.war but it does not pick the changes after
> restart. It keeps showing me the old jsp when i run. I tried with
> autoDeploy=true in Host config but there is no change.

You shouldn't have to do anything strange to get this working. Tomcat's
default configuration is to auto-deploy WARs and directories in the
webapps/ directory and also to re-load them if they change.

The only thing that can get out-of-sync is the Tomcat deployment
descriptor (context.xml) that gets copied from the WAR file (or
directory) into conf/[Service]/[Hostname]/[appname].xml. You will have
to undeploy/deploy (or just delete the file) in order to update it.

> Do i have to manually delete the ROOT folder that tomcat creates,
> everytime before the fresh deployment?

No, but it might be a good idea to completely shut-down Tomcat, delete
the entire "work" directory as well as an exploded WAR directories in
webapps/ and any files in conf/[Service]/[Host]. Then, start Tomcat
normally and everything should run smoothly from there on out.

- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message