tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graeme Miller <>
Subject Apache, mod jserv, shtml and Tomcat jsp
Date Sun, 22 Jul 2001 22:34:43 GMT
OK everyone I am kinda stuck on an Apache/Tomcat cooperation issue at the

In Apache virtual.conf how do I get mod_jserv passing all request for jsp
pages to tomcat whilst ALSO have Apache successfully run server side
included html (ie *.shtml files) that include jsp pages?
I need to get the following setup working :-
- Tomcat as the jsp engine serving all jsp pages
- Apache as the shared webserver serving everything else including shtml
files (ie. html with server side includes)
- Mod JServ using apj12 as the protocol for apache to talk to tomcat

Unfortunately all the jsp pages are in the same document root as all the
html images etc and all links are already set up so I can't just strip out
the jsps, put them into a separate directory and set up a context for that
directory.  I really need a solution that allows them to stay in place and
have tomcat pick up jsps, while Apache picks up the rest.

Currently I managed to achieve the following :-
1) Got apache to pass all files that end in *.jsp through to Tomcat by using
a transparent rewrite rule (don't know how to do this using mod_jserv) using
the following line

RewriteRule ^/(.*jsp)$ http://myserver:8987/$1 [P]

2) Got server side includes that include static files only to work using the
following lines

Options Includes
AddHandler server-parsed .html

However the above will not work if the server side include is a reference to
a jsp page.  The uncompiled jsp text will be inlined in the shtml file
instead of doing what I want which is to have the jsp page be executed by
tomcat and the results being inlined by the server side include

Does anybody know the answer or have any ideas?



View raw message