Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6702079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:00:39+00:00 2026-05-26T07:00:39+00:00

I have a webapp that is deployed as a WAR file to a Tomcat

  • 0

I have a webapp that is deployed as a WAR file to a Tomcat 6 server. It stores some data in a directory inside the app itself. These files get overwritten when a new version of the app is deployed, but it’s trivial to back them up and re-add them.

However, one of my coworkers claims that Tomcat will sometimes spontaneously re-explode my WAR file, even if the exploded version is already there, and wipe out these files. I have never seen this behavior before. I can figure out a workaround for this if I really have to, but is this something that actually happens, either spontaneously or on server restart?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T07:00:39+00:00Added an answer on May 26, 2026 at 7:00 am

    Tomcat will only autodeploy without restart whenever you have

    <Host autoDeploy="true">
    

    in your /conf/server.xml and you edit one of the resources in the expanded WAR. But this setting is not really recommended for production environments as it may lead to memory leaks. This is also by default turned off.

    That said, I strongly recommend to put that data you’re talking about outside the WAR. If they are supposed to be part of the webapp’s runtime classpath, just put them in a fixed disk file system path outside Tomcat, e.g. /var/webapp/config and edit the shared.loader property of /conf/catalina.properties to specify that path:

    shared.loader = /var/webapp/config
    

    Those resources will then be available in the classpath the usual way. This way you don’t need to backup and re-add it, which is plain clumsy and very error prone.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Tomcat-powered webapp that builds to a war and is deployed. It's
I have deployed a .war file inside Jetty Server. The server has been started,
I have a Java webapp WAR file that depends on multiple jars in it's
Let's say I have a Java webapp deployed on some Application Server with clustering
I have to deploy a webapp on Tomcat 6.0.24, serving some webservices that should
I have a java webapp that has to be deployed on either Win or
I have a webapp that I am in the middle of doing some load/performance
multiple webapp running on same tomcat using same jvm. sometime, one webapp that have
I have a fairly large webapp that I run on a Media Temple server.
I have a very large problem. I've written a large app using Flex3/Tomcat/BlazeDS/Spring that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.