tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From migar <micahpeng...@yahoo.com>
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 the.domain.com 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 >
	ServerName the.domain.com
	DocumentRoot "C:/some/directory"
        JkMount /*.jsp ajp13
</VirtualHost>

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"
reloadable="true" 
	useNaming="true" debug="0" privileged="false" 
	swallowOutput="false">

</Context>


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.
the.domain.com/thePath).  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
alone.

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
me.

TIA,
Migar



	
		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message