0

We have tomcat 5.5.25. There are around 10 war files deployed in this tomcat.

All the war files are in a separate directory, and we have xml files for each app in conf/catalina/localhost folder.

For example take app.war application

app.war file is present in a /tomcat/apps directory.

app.xml file present in conf/catalina/localhost folder.

and exploded directory is present in webapps folder.

app.xml file looks like this

<Context path="/app"docBase="/tomcat/apps/app.war">
</Context>

and this application is accessible using url

http://mytomcat:8080/app

Now My requirement is to access the application directly using the url

http://mytomcat:8080/

To achieve this what configurations do I need to change? please help

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Kishore Tamire
  • 2,054
  • 5
  • 23
  • 25
  • Have you tried to use the "ROOT" folder as your webapp folder or http://stackoverflow.com/questions/715506/tomcat-6-how-to-change-the-root-application to convert your app.war in the ROOT app – jenaiz Mar 18 '14 at 21:09

2 Answers2

2

Rename app.xml to ROOT.xml in the conf/catalina/localhost folder and change the file into:

<Context
  path=""
  docBase="/tomcat/apps/app.war">
</Context>
morisil
  • 1,345
  • 8
  • 19
0

Context path must be mapped to "/". convention is to call the web app at the root folder ROOT, and Tomcat will deploy a web app of that name to root if you let Tomcat auto-deploy.

Michael Piefel
  • 18,660
  • 9
  • 81
  • 112