Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

tomcat 6 WAR deployment

 
sandeeep kumar
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Thanks,
Sandeep
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18169
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
vijin das
Ranch Hand
Posts: 129
Firefox Browser Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic