Hello!
I am having a situation which I cannot understand and resolve.
I have configured Apache+mod_jk+Tomcat. Apache Web server hosts PHP web sites only and Tomcat hosts JSP web sites only. Almost everything works well but jsp:include stoped working properly!!!
Using VirtualHosting I configured:
domain_1.com - is processed by Apache
domain_2.com - is processed by Tomcat(both static content and JSP/Servlets)
In domain_2.com JSP is working well, Servlets are working well. But jsp:include stoped working properly!!!
For example:
index.jsp includes siteMenu.jsp
<jsp:include page="WEB-INF/siteMenu.jsp"/>----- this works well!
but other pages located in subfolders cannot access WEB-INF
<jsp:include page="../WEB-INF/siteMenu.jsp"/>----- does not work. Cannot find the file..
and
<jsp:include page="/WEB-INF/siteMenu.jsp"/>----- from subfolders does not work
....
But if I access web sites using Tomcat only - not via Apache and mod_jk, then the Web site is working properly and all pages are included properly. No code modification needed.
Please advised me what did I configure wrong? How to fix this?
#worker.properties file
workers.tomcat_home=/mnt/ebs/apache-tomcat-6.0.14
workers.java_home=/usr/java/jdk1.6.0_21
worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
#server.xml
<Host name="www.domain_2.com" appBase="webapps/domain2"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="/" docBase="/mnt/ebs/apache-tomcat-6.0.14/webapps/domain2"/>
</Host>
# Configure mod_jk in httpd.conf
#
LoadModule jk_module /etc/httpd/modules/mod_jk.so
JkWorkersFile /mnt/ebs/apache-tomcat-6.0.14/conf/worker.properties
<VirtualHost *>
DocumentRoot "/mnt/ebs/apache-tomcat-6.0.14/webapps/domain2"
ServerName "www.domain_2.com"
DirectoryIndex index.jsp
JkMount /* ajp13
</VirtualHost>
Thank you!