This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
There is a problem with including files from a parent directory in tomcat 5.5.26. I have tried this on windows and freebsd with the same effect. The catch is that if the appdocs in the host container is something other than webapps and defined as an absolute path you will get a "file not found error". I.e you will not be able to include file="../test.jsp" but files from sub directories work. Please note that file="../test.jsp" would still be in the context path.
Please include your web app structure and the paths that you are using.
Joined: May 03, 2006
Tomcat is installed in c:\dev\apache-tomcat-5.5.26. Here is the Host container of the server.xml <Host name="localhost" appBase="c:/dev/test" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
In the directory c:\dev\test\ I have the following jsp: ------- c:\dev\test\test1.jsp ---------- <%="Hello World"%> ------- End file c:\dev\test\test1.jsp ----------
In the directory c:\dev\test\test\ I have the following jsp: ------- c:\dev\test\test\index.jsp ---------- test <br><b><%@ include file="../test1.jsp"%></b><br><br> ------- End file c:\dev\test\test\index.jsp ----------
Please be sure to use UBB code tags when posting code to the forums. Unformatted code is extermely hard to read and many people that might be able to help you will just move along. Please read this for more information.
You can go back and change your post to add code tags by clicking the .