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

  • Home
  • SEARCH
  • 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 6338779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:30:55+00:00 2026-05-24T19:30:55+00:00

This is a somewhat different question about Tomcat deployment. It has been covered partially

  • 0

This is a somewhat different question about Tomcat deployment. It has been covered partially by earlier questions but I would like to here from those who have actually done Tomcat deployments.

In my organization I see two types of deployment.

  1. WAR deployment to Tomcat webapps dir. Tomcat is stopped, the existing WAR file is renamed, the existing app directory under webapps (appBase) is removed, the new WAR is copied in and Tomcat is restarted.
    The upside: deploying WARs seems to be understood by everyone.
    There are two downsides that I can see.

    A. if the WAR contains deployment specific information, such as DB connect info, the development environment requires some sort of version and build control to make sure the correct deployment-specific information goes into a WAR file. This could get complicated.

    B. Many steps, not difficult but each step is a potential point of error.

  2. appBase points to the application file system, deployment-specific information kept elsewhere. The applications deployable file system or a WAR file is copied to a location on the Tomcat box. The appBase attribute for the application in Tomcats Servlet.xml is modified to point to the newly deployed code. Tomcat is restarted after the copy.
    All deployment specific config information is kept in a separate directory under [tomcat_root] that is not affected by the deployment. If any changes are required the edits can be made any time and Tomcat restarted to pick up the changes. The upside: dead simple, usually only one step, at most two steps The downside: file editing on the deployment machine may be required. This is not allowed in many production environments or must be done by a sys admin not the deployment person. May cause delays, political problems and finger pointing if something
    goes wrong.

As I said above, I would like to hear real world experience with either method. I definitely favor the second method. I wonder what the attraction of the first is since
it seems to be much more error prone.

Thanks,
-=b

  • 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-24T19:30:56+00:00Added an answer on May 24, 2026 at 7:30 pm

    Here’s how I do it:

    In source control I have properties files for each environment. For example, production-environment.properties, qa-environment.properties, etc. All of the properties files are in the resources source directory and are included in the WAR file.

    Tomcat is started with a system property that selects the environment, for example:

    -Denvironment=production.

    The application chooses which properties file to use at runtime based on the system property.

    No special build or deploy steps are needed. One WAR file per build is used across all environments.

    Another aspect of this approach is that properties in the WAR file can be overridden by system properties. This allows ops to change properties after the WAR has been deployed. Also it allows sensitive information like database passwords to be left out of source control completely.

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

Sidebar

Related Questions

Sorry about repeating the Question, but this is some what different. I'm looking for
I know this is somewhat of a server question, but I wanted to ask
[This question is somewhat related to this question , but the answers are not...]
This is somewhat of a broad question, but it is one that I continue
This is somewhat of a multipart question, but.. I am looking to query a
This is somewhat of a follow-up question to this question . Suppose I have
This is somewhat asp.net MVC related only for example purposes but I was hoping
I know that this is somewhat subjective, but I wonder if there is a
This is a somewhat low-level question. In x86 assembly there are two SSE instructions:
This is a somewhat bizarre question. My objectives are to understand the language design

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.