Hi,

We are moving from Tomcat 5.0.28 to Tomcat 5.5.16, and we found that JSP
<%@ include %> directives fail when the path contains a call to a file
placed in the parent (..) directory.

AFAIK Tomcat is creating a separate context for JSP files in the /admin/
directory. How can I disable this behavior?

This is our server.xml file. We replaced the original one with this
trimmed version. We only use AJP (which works fine), and as we have
several tomcats running on the same server we changed the port numbers

-
--[server.xml]----------------------------------------------------------------
<Server port="46007" shutdown="SHUTDOWN">

  <Service name="Catalina-Service-DG-46006">

    <Connector address="127.0.0.1" allowTrace="false"
      enableLookups="false" maxPostSize="2097152"
      scheme="http" secure="false" port="46006" protocol="AJP/1.3" />

    <Engine name="Catalina-Engine-DG-46006" defaultHost="localhost">

      <Host name="localhost"
        appBase="/var/www/html/oursite.com" autoDeploy="false">
        <Alias>www.oursite.com</Alias>
        <Alias>oursite.com</Alias>

        <Context path="/" docBase="" cookies="true" />

      </Host>
    </Engine>
  </Service>
</Server>
- ------------------------------------------------------------------------

- --[/var/www/html/oursite.com/foo.jsp]-----------------------------------
<% out.write("<h2>foo</h2>"); %>
- ------------------------------------------------------------------------

- --[/var/www/html/oursite.com/admin/bar.jsp]-----------------------------
<% out.write("<h1>Bar</h1>"); %>
<%@ include file="../foo.jsp" %>
- ------------------------------------------------------------------------

- --[Error when calling oursite.com/admin/bar.jsp]------------------------
org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /bar.jsp(2,0) File "/../foo.jsp" not
found
- ------------------------------------------------------------------------

Thanks!

Iván Montoro

P.S. Sorry if this is covered in any FAQ, but I've searched the mailing
list archives, google'd and read the Tomcat docs without clue...

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to