tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From migar <>
Subject sharing apache DocumentRoot with tomcat webapp directory, serving .jsps via mod_jk
Date Tue, 07 Dec 2004 18:03:44 GMT
Hi - 

I would like to set up my Apache2/Tomcat4.1 server so
that my domain root will point directly
to a Tomcat non-default webapp which contains static
HTML pages, jsp, servlets etc.  In this scenario, I
have set up Apache with a VirtualHost whose
DocumentRoot is the directory location of my Tomcat
webapp (which resides outside of Tomcat's webapp
directory and is referenced with an XML context file
in the webapp directory.)  I am using mod_jk to allow
Tomcat to serve all of the non-static content.  Here's
what my mod_jk.conf file looks like, roughly:

<VirtualHost *:80 >
	DocumentRoot "C:/some/directory"
        JkMount /*.jsp ajp13

There are no servlets or anything that need to be
mapped to a URI.  Within this webapp's context
container is:

<Context path="thePath" docBase="C:/some/directory"
	crossContext="false" override="true"
	useNaming="true" debug="0" privileged="false" 


My problem is that I don't want to eliminate the path
attribute of this webapp in order for the .jsp pages
to be served - my JkMount directive is telling Tomcat
to only serve jsps that are within the default webapp
(ie ROOT), and if I want to access this webapp without
any additional path info in the URI (ie.  Is there a way to use
JkMount to append this path information to give to
Tomcat so it knows where to look for the jsps for this
webapp as opposed to looking in the default webapp?  I
can't just set this webapp as default by eliminating
the path attribute in it's context element because
their are other resources on the server that need to
be accessed via the ROOT webapp that i want to leave

I know that their has to be an easy configuraton
technique that I'm missing to do this, and I was
hoping that someone might be able to point this out to


Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we.

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

View raw message