aspose file tools*
The moose likes Tomcat and the fly likes tomcat redeployment - options Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "tomcat redeployment - options" Watch "tomcat redeployment - options" New topic
Author

tomcat redeployment - options

San Muthu
Greenhorn

Joined: Sep 06, 2012
Posts: 3
Hi,

I have sample.war deployed and running in tomcat. I have some contents added to webapps/sample/data. When i redeploy(auto) any new war i do not want to overwrite this folder (data). is it possible with tomcat?
Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 820

Santhi Muthusamy wrote:Hi,

I have sample.war deployed and running in tomcat. I have some contents added to webapps/sample/data. When i redeploy(auto) any new war i do not want to overwrite this folder (data). is it possible with tomcat?


application data should be in a directory on the same level as webapps so that it is not erased when you redeploy your app.
San Muthu
Greenhorn

Joined: Sep 06, 2012
Posts: 3
Hi,

Thanks for the reply.

The project code seems to be legacy code.. So i did not want touch anything there. Is there any way in tomcat to achieve this?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16305
    
  21

This is reason #2 why you should never attempt to write data to your WAR.

Reason #1 is that in a pure J2EE implementation, the WAR is a ZIP file and attempting to open and write it as a file won't work.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: tomcat redeployment - options