Hello,

I had had the same problem than you and the only solution that i have
found was to re-create 
each folder (under my Apache document root) who need JSP publication as
a context for tomcat, 
because i have never find a trick for giving the request to tomcat AFTER
the URI-to-filename translation phase in Apache. It will be a thing
fixed in Apache 2 as i have read. (but the Apache/Tomcat connector will
need a rewrite
for this, i'm not very sure if mod_webapp is planned to use the requests
send by Apache after the URI-to-filename
conversion). 

If your not sure, the best solution is to read the source of Tomcat,
mod_jk (or mod_jserv it's what 
i use) and perhaps Apache (or the book Writing Module for Apache who
explain the differents phases where a module
can receive a request from Apache).

Somy solution of recreating a context for each folder where i need
JSP/XML publication suffer of some drawbacks :
- it's very, very expensive in memory if , as me, you have embedded
Cocoon as a default servlet, loaded a the creation for EACH context (my
bi-Sun UltraSPARC 60 with 1 GB of RAM is a little short with more than
20 contexts)
- the integration that i have made isn't pretty (for giving the same
document root as Apache, avoiding to have a
WEB-INF folder for each context (I know that it's not in the standard of
JSP/Servlets but i have other things to do that protect each of this
directories and maintain a configuration file (web.xml) and servlets
files per directory),
force the reading of the server.xml file at the beginning...) : i have
patched my tomcat and cocoon sources (but at some locations where it is
indicated to patch) 
- the errors on an JSP/XML url aren't forwarded to Apache
...there is some other little problems but that's work.

I you want more informations for dealing between virtual host+rewrite
rules with Apache+Tomcat (and Cocoon 
in my case) contact me, i don't want to appear as a stupid hacker if i
say in the list where i have patched the sources :-)

So, if you don't want more explanations, good luck because i have found
that it is very hard to integrate tomcat on a real Apache production web
server (where we abuse of rewrite rules and virtual hosting)

-- 
 [EMAIL PROTECTED]

 INRIA - 2004 route des lucioles - BP 93    Tel: (33/0) 4 92 38 50 41
 06902   SOPHIA-ANTIPOLIS cedex (France)    Fax: (33/0) 4 92 38 76 02

Reply via email to