You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Andre Prasetya <an...@gmail.com> on 2006/11/27 12:43:35 UTC

Context Path

Hi,

lets say that i have a war named dodol.war, if i deployed to tomcat, it will
be deployed to /dodol rite ? is it possible to get the path '/dodol'
programatically ? I am thiking of putting a configuration file outside
tomcat lets say at /opt/server/gateway/config and the file name will be the
war name and an extension. So at this example, the configuration file will
be /opt/server/gateway/config/dodol.xml

is this possible ?

-- 
-Andre-

PCs are like air conditioner, if you open Windows, they don't work

Re: Context Path

Posted by Mikolaj Rydzewski <mi...@ceti.pl>.
Andre Prasetya wrote:
> lets say that i have a war named dodol.war, if i deployed to tomcat, 
> it will
> be deployed to /dodol rite ? is it possible to get the path '/dodol'
> programatically ? I am thiking of putting a configuration file outside
> tomcat lets say at /opt/server/gateway/config and the file name will 
> be the
> war name and an extension. So at this example, the configuration file 
> will
> be /opt/server/gateway/config/dodol.xml
>
> is this possible ?
Not with servlet spec 2.4. Tomcat 6 will implement spec 2.5 and one will 
be able to get context path in ServletContextListener.

http://www.javaworld.com/javaworld/jw-01-2006/jw-0102-servlet.html?page=6

-- 
Mikolaj Rydzewski <mi...@ceti.pl>