HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   Tomcat Apache SSI (http://www.howtoforge.com/forums/showthread.php?t=29921)

xtine 1st January 2009 12:38

Tomcat Apache SSI
 
I currently have Tomcat and Apache working together via mod_jk. All requests are sent to Tomcat, and certain directory/file types are sent back to Apache to serve.

Quote:

# By default, all requests go to worker1
JkMount /* worker1

# Serve html, jpg, and gif using httpd
JkUnMount /images/*.jpg worker1
JkUnMount /images/*.gif worker1
JkUnMount /styles/*.css worker1
JkUnMount /scripts/*.js worker1
The above works just fine. The part I'm puzzled about is how to fit SSI into the picture. I just added SSI to both Tomcat and Apache by following these instructions:
http://httpd.apache.org/docs/1.3/howto/ssi.html
http://tomcat.apache.org/tomcat-6.0-doc/ssi-howto.html
http://tomcat.apache.org/tomcat-6.0-...g/context.html

What works:
* Tomcat is able to serve up a .shtml file fine. SSI works.
* Apache is able to serve up a .shtml file fine. SSI works.
* Apache is able to serve up a .html file that includes a SSI via the XbitHack (by making the .html file executable). SSI works.

What doesn't work: I'm unable to get a SSI (that's a .html file) within a dynamically created html file (created by Tomcat) to work. The include inside the dynamically generated html file looks something like this.
Quote:

<!--#include virtual="/somemodule.html?param1=9&param2=true" -->
Ideally, I would like Apache to send everything to Tomcat (as it is now), Tomcat to dynamically create the html file (as it is now), and for Tomcat to send the server side include back to Apache to process (don't know how to do). Is this do-able? If so how?

If this is not possible, then I'd like Tomcat to know how to process that include, which is a .html file. I'm only able to get Tomcat to process .shtml files for SSI. I've tried changing the following in $CATALINA_BASE/conf/context.xml to get it to include .html files instead (which probably isn't a good idea anyways?), but no luck.

Quote:

<servlet-mapping>
<servlet-name>ssi</servlet-name>
<url-pattern>*.shtml</url-pattern> <--- tried changing this to *.html
</servlet-mapping>
Any ideas?


All times are GMT +2. The time now is 11:40.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.