tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ruth, Brice" <br...@fiskars.com>
Subject Re: How to configure main web app to skip URL application context
Date Thu, 22 Jul 2004 15:12:18 GMT
Michael Mehrle wrote:

>The gist of it is that I will forgo Apache altogether and run Tomcat on port
>80. Now, in order to do that I need to:
>
>a) Serve index.jsp directly like this http://www.hostname.com/index.jsp (or
>http://www.hostname.com) instead of having to go to:
>http://www.hostname.com/myapp/
>
>b) Serve the rest of my application directly in the same fashion without
>having to specify the webapp context
>
>I've seen this done with a Tomcat demo installation of Roller, so I know
>it's possible. Any input would be appreciated.
>
>Thanks!
>
>Michael
>  
>
What you're looking for is installing your context in the "ROOT" context 
for Tomcat. The easiest way I've found to do this is to place your 
web-application (exploded is what I typically do), in the appBase 
directory for the Host container you've configured in Tomcat's 
server.xml - then place a context XML in that directory that has the 
following content:

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

That's it ... point your browser to your host and you should be in good 
shape. Be aware - out of the box, Tomcat ships with a simple 'ROOT' 
application loaded into the 'ROOT' context ... you should remove this 
from the server.xml file first.

Respectfully,
Brice Ruth

-- 
Brice Ruth, Sr. IT Analyst
Fiskars Brands Inc
http://www.fiskarsbrands.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message