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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:51:10+00:00 2026-05-25T13:51:10+00:00

I have a webapp (springmvc 3.0.5/java 1.6 based) that I’m deploying to a tomcat

  • 0

I have a webapp (springmvc 3.0.5/java 1.6 based) that I’m deploying to a tomcat (6.0.32) web server on a linux machine. Currently I copy the war file out to the server and let tomcat unpack it for me.

relevant lines in server.xml:

<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true" xmlNamespaceAware="false" xmlValidation="false">
  <Context docBase="fooapp" path="/" reloadable="true" source="org.eclipse.jst.jee.server:Fooapp"/>
</Host>

I want the webapp context path to be “/” so I don’t have to add /fooapp/ to every url. http://www.mydomain.com/index.html instead of http://www.mydomain.com/fooapp/index.html

The issue is that in my current configuration the webapp is served from BOTH “/” and from “/fooapp” context paths because tomcat unpacks the war twice. Once to the fooapp directory and another time to the ROOT directory.

I’d like the web application to be unpacked just once to the fooapp directory and still served from the “/” context path. Can this be done on linux and if so how?

Note: This works on windows exactly as I want so I’m hopeful that linux can do the same thing.

  • 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-25T13:51:11+00:00Added an answer on May 25, 2026 at 1:51 pm

    The simplest method:

    1. Delete your Context tag from the server.xml,
    2. delete webapp/fooapp and webapp/ROOT directories,
    3. copy your fooapp.war to the webapp directory as ROOT.war.

    You can find some other methods in the Tomcat’s documentation.

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

Sidebar

Related Questions

I have a java webapp that has to be deployed on either Win or
I have a Java/Spring MVC/JSP/JSTL webapp. We have a designer that gave us some
I have a webapp that uses SpringMVC DispatcherServlet to load a WebApplicationContext. The Spring
I currently have a webapp that consists of ~100 unique URLs + ~75 pages.
I have a webapp development problem that I've developed one solution for, but am
I have a webapp that I am in the middle of doing some load/performance
I have a webapp that lists all of my artists, albums and songs when
I have a small Spring MVC webapp (which embeds ActiveMQ) that is designed to
I have an existing, fully functional Spring web application based on Spring 2.5.6 -
I have webapp that connect to oracle DB via JDBC and used class oracle.jdbc.OracleDriver.

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.