aspose file tools*
The moose likes Tomcat and the fly likes Deleting the WAR file in Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Deleting the WAR file in Tomcat" Watch "Deleting the WAR file in Tomcat" New topic
Author

Deleting the WAR file in Tomcat

Eugene Abarquez
Ranch Hand

Joined: May 18, 2006
Posts: 211
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


There's so much to learn in this industry, and not everybody has the necessary interest.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39547
    
  27
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.


Ping & DNS - updated with new look and Ping home screen widget
Eugene Abarquez
Ranch Hand

Joined: May 18, 2006
Posts: 211
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

Joined: Dec 11, 2004
Posts: 13410

Tomcat will recognize any folder under webapps, if it directly contains a WEB-INF folder as a web application.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Deleting the WAR file in Tomcat
 
Similar Threads
Replacing existing files with updated ones
War not updating
servlet can't see html files?
Running servlet in tomcat
How to redeploy a webapp that already exists