Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I've configured Apache+Tomcat. Now jsp:include cannot access files loc

Status
Not open for further replies.

serezhka

Programmer
Sep 20, 2010
3
0
0
CA
Hi! I've configured Apache+Tomcat. Apache Web server serves as a front end server and hosts PHP web sites only and Tomcat hosts JSP web sites only. Almost everything works well but jsp:include stoped working properly! jsp:include cannot access files located in upper level folders.

Examples:

<jsp:include page="WEB-INF/siteMenu.jsp"/>----- this works well!
<jsp:include page="inc/siteMenu.jsp"/>----- this works well!

<jsp:include page="/WEB-INF/siteMenu.jsp"/>----- does not work!
<jsp:include page="../WEB-INF/siteMenu.jsp"/>-----does not work!
<jsp:include page="../inc/siteMenu.jsp"/>-----does not work!

However if do not use mod_jk and access JSP web application with Tomcat as Stand along server then jsp:include works properly and no problems appear. Please advise me how to resolve this situation.?

Thank you!

#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=" 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 "DirectoryIndex index.jsp
JkMount /* ajp13
</VirtualHost>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top