Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

JavaWorld Daily Brew

Context path and multiple domain hosting on a tomcat



Hi,

I've a hosting environment where i am trying to host two domains in one tomcat. One is deployed as ROOT/default domain and other i am trying to configure using the following host tag

<Host name="www.domain2.com"
        appBase="user/home/tomcat5.5/webapps/domain2">
<Context path="" docBase="."/>
</Host>

In this second domain i've a subdirectory to hold certain jsp pages [domain2/prop/xxx.jsp]. On this jsp if i access
request.getContextPath()
I am getting the values as "/prop" instead of empty string.
Did i missed any configuration because of which its giving the context path differently?
Any other way to fix this issue?

- Rakesh