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 843543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:08:44+00:00 2026-05-15T06:08:44+00:00

I have two applications deployed on tomcat. For each application I have defined their

  • 0

I have two applications deployed on tomcat. For each application I have defined their own context in $CATALINA_HOME/conf/Catalina/localhost where JDBC datasource is defined. When I undeploy one of the application using ant script context of this application is deleted, so on the next start of the tomcat application cannot be deployed because it doesnt have JDBC connection defined. Is there any solution to this problem?

  • 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-15T06:08:44+00:00Added an answer on May 15, 2026 at 6:08 am

    I think this is a Tomcat bug. I filed a bug report but the fix is complicated.

    Tomcat can deploy application in 3 ways,

    1. Directory, like webapps/myapp.
    2. WAR, like webapps/myapp.war.
    3. Context fragment, which is what you are using.

    If you use #3 but the app or war are in webapps, Tomcat will be confused with #1 or #2. When redeploying directory or war, it supposes to remove context fragment.

    My workarounds are,

    1. If you use directory, put it somewhere other than APPBASE (webapps). If you use WAR, put it somewhere else also and don’t explode it.
    2. We deploy our app using a script. In the script, the fragment is copied over every time after app is undeployed.

    Here is a sample fragment for WAR deployment,

    <Context docBase="/anywhere/but/webapps/myapp.war"
        swallowOutput="true" unpackWAR="false" />
    

    Please notice not every app runs in unpacked mode. You can’t read any resources as files from the WAR in unpacked mode.

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

Sidebar

Related Questions

I have two .NET applications that talk to each other over a named pipe.
I have two desktop applications. After closing the first application, the first application will
I have two computers - Computer1 and Computer2. I deployed my web application on
I have a application which is deployed in tomcat 6 In this application I
On my Tomcat 6.0.x I have a context.xml file in the conf directory and
I have two web applications (bot of them ear files) deployed on the weblogic
I have a Grails application that is deployed on a Tomcat 6 server. The
We've been investigating this issue for a week now. We have two applications deployed
I am using two different web application deployed in the same tomcat instance. One
I have two applications Web Socket and Web Service created in .Net/Web Form and

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.