File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes tomcat 6 WAR deployment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "tomcat 6 WAR deployment" Watch "tomcat 6 WAR deployment" New topic

tomcat 6 WAR deployment

sandeeep kumar

Joined: Aug 17, 2010
Posts: 1
Hi all,

I have a web application WAR deployed on tomcat 6.
steps followed for deploying the web application.
Stop tomcat server.
copy WAR file to catalina base folder.
Start tomcat server.
WAR file exploded and proper directory structure created at catalina base folder.

Application is running fine without any issues, now if i go ahead and directly update some text file which is a part of exloded folder (no change to war file still same old war file which was copied at start) and bounce (stop - start) the tomcat server, how will tomcat behave, will it cleanup the exloded directory structure and re-explode the war file and my changes will be lost or will it do nothing and my changes will be intact.

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17417

Welcome to the JavaRanch, Sandeep!

When tomcat explodes a WAR, it remains until you remove it. It won't re-explode and wipe out any out-of-band changes you made. Although, of course, changing things that way should only be done for things like emergency temporary fixes.

In fact, once a WAR has been exploded, Tomcat will ignore any changes or replacement of the original WAR file. That means that if you update a WAR file and the WAR was already exploded, Tomcat will continue to use the old exploded WAR resources until you delete the webapps/"exploded-war" directory.

An IDE is no substitute for an Intelligent Developer.
vijin das
Ranch Hand

Joined: Jun 07, 2010
Posts: 129

Have to delete that exploded directory once you recreated the new .war file ...

other wise use manager option available with tomcat ...

which is very easy to upload ypur war files

I agree. Here's the link:
subject: tomcat 6 WAR deployment
jQuery in Action, 3rd edition