wood burning stoves 2.0*
The moose likes Tomcat and the fly likes changing ROOT in Tomcat 5.5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "changing ROOT in Tomcat 5.5" Watch "changing ROOT in Tomcat 5.5" New topic
Author

changing ROOT in Tomcat 5.5

Alexey Gor
Greenhorn

Joined: Jul 13, 2004
Posts: 27
Hello,
I read a lot about this but nothing seems to work. Strange that there is not a lot of info on this seemingly popular topic.

I want my context to be displayed when I hit http://localhost:8080. I'd like to do it without having to deploy my application as ROOT.

Let's say I have a web all called alexey.war

How can I make http://localhost:8080/ equivalent to http://localhost:8080/alexey/

How can I make http://localhost:8080/someURI/morestuff/? equivalent to http://localhost:8080/alexey/someURI/morestuff/?

Here is what I tried:
context.xml in my app with
<Context path="" docBase="alexey" debug="0" reloadable="true">
</Context>

Some other stuff too... I really want to do this without having to change ROOT stuff or name of my context. Documentation says that empty path string (path="") should replace ROOT context with my app but that does not seem to work. I searched and there is no ohter path="" anywhere in Tomcat... thanks!
Alexey Gor
Greenhorn

Joined: Jul 13, 2004
Posts: 27
nevermind, looks like I did it...

I tried this before but not it works for some reason. I added that <context> tag to server.xml.... putting it in a separate context.xml as recommended did not seem to work. There are probably other things that prevent it from working... I probably just took one of them out at some point... oh well...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: changing ROOT in Tomcat 5.5
 
Similar Threads
Tomcat6 and Java Beans
setting index.html to my context root
IIS and TOMCAT
Context in tomcat
settting my webapplication index page as tomcats index page