• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How and where to configure tomcat6 for default directory instead of ROOT

 
Phinmel sithu
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have installed Tomcat6 for my application, let's say Mapp. But I cannot configure Server.xml file to get my application as a default.
When I type http://localhost, the tomcat page load first and I have to type http://localhost/Mapp to ge the login page to my application.

Anyone can kindly advise me to get the login page as a default when I type http://localhost ?

[ October 19, 2008: Message edited by: Phinmel sithu ]
[ October 19, 2008: Message edited by: Phinmel sithu ]
 
Dave Paine
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi There.

I guess by now you have sorted this, but just in case you haven't (or perhaps this will be useful to someone else), you need to edit the server.xml file located in the conf directory of your tomcat install. In there you will find the following

<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
.
.
.
</Host>

(in my system, the dots contain some commented out stuff). Where the dots are (i.e. before the </Host>) add the following

<Context
docBase="Mapp/"
path="">
</Context>

and restart Tomcat. You should now be good to go.

Hope that helps someone ...
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic