tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <>
Subject Re: adding a global URI prefix for Tomcat web apps
Date Tue, 17 Apr 2012 15:27:00 GMT
2012/4/17 ron.vandenbranden@home <>:
> So far, so good. Yet, I am struggling with the Tomcat side of this approach:
> finding a way to add a global path prefix for requests to Tomcat apps. The
> closest I got was this:
>    1. don't touch the physical location of the Tomcat apps: leave them at
> ${CATALINA.HOME}/webapps
>    2. change ${CATALINA.HOME}/conf/server.xml as follows:
>    <Host name="localhost"  appBase="webapps" unpackWARs="true"
> autoDeploy="false" deployOnStartup="false">
>      <Context path="/apps/my_app" docBase="/my_app/" reloadable="true"/>
>    </Host>

I would not comment on the Apache HTTP server configuration. Just on
the quoted part above. You have not told us what Tomcat version you
are using, but in current Tomcat 6 and 7 you can add "apps#" prefix to
the subdirectory and war file names in webapps directory and it will
add "apps/" to their URL, e.g.:

 mv  webapps/my_app  webapps/apps#my_app

A war file name would be "apps#my_app.war" See "Context" page in
"Configuration Reference Guide" for more details.

Best regards,
Konstantin Kolinko

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message