File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Deleting the WAR file in Tomcat

 
Eugene Abarquez
Ranch Hand
Posts: 211
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using Tomcat to deploy my web applications (written in Struts), and I am constantly doing updates on the files (like configuration files, jsps and the like) by replacing the files in the extracted folder of the WAR in the webapps folder and reloading it.

My problem though is, if the Tomcat is restarted, the updates that I did on the extracted folder is replaced with the old files from the WAR. Is there a way that I can do my updates easily, as I don't want to upload a new WAR to the server every time a new update is needed especially if it is just changes in the jsp or conf file? Can I just delete the WAR and leave the extracted folder there? Will deleting the WAR cause any problems to the application?

Any advice will be appreciated.

Thanks,

Eugene
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you delete the WAR file while Tomcat is running, then Tomcat will undeploy and delete the complete web app directory - probably not what you want.

If you don't want to use the WAR file, why are you deploying the web app using one in the first place?

I'd suggest to: shut down Tomcat, delete the war file, and then work with the web app directory contents exclusively.
 
Eugene Abarquez
Ranch Hand
Posts: 211
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ulf Dittmer:

If you don't want to use the WAR file, why are you deploying the web app using one in the first place?


Hi Ulf,

Thanks for the quick reply.

Because that's the only way I know how to deploy my web apps, by packaging it inside a WAR file. Shameful I know.

I didn't know that you can actually work with the unpacked folder directly and totally leave the war file out. Now I know. Thanks!

Eugene
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat will recognize any folder under webapps, if it directly contains a WEB-INF folder as a web application.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic