After some digging by Andrew, it appears that there may be some issuea with how
<@include>'s are performed within a war file rather than with a deployed app.

If the application is deployed as a directory (the war file unpacked into a
directory) then Jasper has no troubles at all finding "../testdir/inc.jsp".
However, it cannot find the file if the app is deployed as a war file. I would
assume that the reason I could not find a similar problem when deploying the war
file in Weblogic is because Weblogic may expand the war file into a temporary
directory before execution.

Has anyone else experienced similar issues with expanded vs War file webapps?

    ...Paul

Andrew Conrad wrote:

> Little background real quick.  Tomcat allows you to define an
> application Context in the server.xml
>
> Such that, if you wanted a webapp called MyApp, you would set up a
> Context in your server.xml file with the path "/MyApp" and the docBase
> attribute pointing to the location of your web app.  In my testing, you
> could use relative paths WITHIN your Context.  Meaning
>
> If you had a file
> /MyApp/testdir1/getRelative.jsp
>
> You could include these files:
>
> /myApp/inc.jsp (using "../inc.jsp" OR "/inc.jsp" )
> /myApp/testdir1/inc.jsp  (using "inc.jsp" or "/testdir1/inc.jsp")
> /myApp/testdir2/inc.jsp   (using  "../testdir2/inc.jsp" or
> "/testdir2/inc.jsp" )
>
> What you couldn't do was leave your Context and get something else
> (like):
>
> /inc.jsp
> /YourApp/inc.jsp
>
> According to the Servlet 2.3 specification, I do not believe this is a
> bug. (SRV9.5)
>
> "A web application exists as a structured hierarchy of directories. The
> root of this
> hierarchy serves as the document root for files that are part of the
> application."
>
> That seems to say that everything within the "MyApp" webapp should see
> the directory as "/"  and you cannot go below root.
>
> This seems to be consistent with the JSP 1.2 Documentation for
> <jsp:include /> and <%@ include %> tags
> (JSP 2.10.3; JSP 4.4)
>
> -Andrew


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

Reply via email to