It looks like you are starting in webapps/myroot/test1
so your first include can be found:
webapps/myroot/test1 + test2/b.jsp = webapps/myroot/test1/test2/b.jsp

Your second include is still based on where you started:
 
webapps/myroot/test1

so it is:

webapps/myroot/test1 + ../../test3/c.jsp =
webapps/test3/c.jsp

Since c.jsp is in webapps/myroot/test3
you get the error.

Have you tried <%@ include file="../test3/c.jsp" %>

Which would be:

webapps/myroot/test1 + ../test3/c.jsp =
webapps/myroot/test3/c.jsp 

JRun must be assuming the relative path of b.jsp after it is included.
That is how it can find c.jsp.  I'm not sure which way is correct.
Since Tomcat is the reference implementation, it is probably correct?



--- Jeff Sum <[EMAIL PROTECTED]> wrote:
> Hi,
> 
>  I have a strange problem in the include file action. I use tomcat
> 3.1with
> Linux (JDK1.3), my directory structure are as follow:
> 
>  +-- webapps
>      +-- myroot
>          +-- test1
>                  a.jsp
>                  +-- test2
>                          b.jsp
>          +-- test3
>                  c.jsp
> 
> Content of a.jsp:
> <html>
>     I am a.jsp <%@ include file"test2/b.jsp" %>
> </html>
> 
> Content of b.jsp:
> <html>
>     I am b.jsp <%@ include file="../../test3/c.jsp" %>
> </html>
> 
> Content of c.jsp:
> <html>
>     I am c.jsp
> </html>
> 
> Normally when i brows a.jsp, it will output as "I am a.jsp I am b.jsp
> I am
> c.jsp". It works fine at JRun but when I put the application at
> tomcat it
> fail and the error is as below...
> 
> I have tried to use physical path rather then relative path but it
> also fail
> 
>  Internal Servlet Error:
> 
>  org.apache.jasper.JasperException: Bad file argument to include
>   at
>
org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEve
> ntListener.java:688)
>   at
>
org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingList
> ener.java:116)
>   at
> org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:215)
>   at org.apache.jasper.compiler.Parser.parse(Parser.java:1073)
>   at org.apache.jasper.compiler.Parser.parse(Parser.java:1038)
>   at org.apache.jasper.compiler.Parser.parse(Parser.java:1034)
>   at org.apache.jasper.compiler.Compiler.compile(Compiler.java:182)
>   at
> org.apache.jasper.runtime.JspServlet.loadJSP(JspServlet.java:413)
>   at
>
org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
> rvlet.java:149)
>   at
>
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
> va:161)
>   at
>
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
>   at
> org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
>
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
>   at
>
org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
>   at
>
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
> onnectionHandler.java:160)
>   at
>
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
>  )
>   at java.lang.Thread.run(Thread.java:484)
> 
> 
> 
> 


=====
Wyn Easton
[EMAIL PROTECTED]

__________________________________________________
Do You Yahoo!?
Yahoo! Messenger - Talk while you surf!  It's FREE.
http://im.yahoo.com/

Reply via email to