aspose file tools*
The moose likes Tomcat and the fly likes How and where  to configure tomcat6 for default directory instead of ROOT Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "How and where  to configure tomcat6 for default directory instead of ROOT" Watch "How and where  to configure tomcat6 for default directory instead of ROOT" New topic
Author

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

Phinmel sithu
Greenhorn

Joined: Oct 16, 2008
Posts: 1
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

Joined: Jan 09, 2009
Posts: 7
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 ...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How and where to configure tomcat6 for default directory instead of ROOT
 
Similar Threads
Problem with websphere 4.0
how to make second jsp not accessable directly from url
Default Web Application
Cannot read jsp pages when integrating tomcat + apache
request. get User Principal(). getName() do not retreive user name