This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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


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: 17026
    
  26

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.
 
Have you checked out Aspose?
 
subject: tomcat redeployment - options
 
It's not a secret anymore!