• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

changing ROOT in Tomcat 5.5

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic