tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "nfet nfet" <>
Subject Re: Different behavior when forwarding to *.jsp and *.html in WEB-INF
Date Thu, 08 Nov 2001 15:38:16 GMT
Hi Jan,

I am not sure if this is due to the fact that you are not suppose to be able to access the
WEB-INF directory by default, since we are not aware of what you are running, i.e. Apache
with Tomcat or straight Tomcat.

Try taking the jsp and html outside of the directory and place it on the ROOT path then RUN
the test AGAIN.

I hope this helps.

----- Original Message -----
Sent: Wednesday, November 07, 2001 10:56 AM
Subject: Different behavior when forwarding to *.jsp and *.html in WEB-INF
In the attached webapp, outlined in diagram below i see some rather
strange behavior (result of my feeble attempt to isolate the problem).

http://localhost:8080/example/redirectOK.jsp returns ok.jsp

http://localhost:8080/example/redirectBAD.jsp returns empty document

I would have expected both requests to behave in a similar manner
is this a bug or is there a reason why outcome differs ?

/ -+- redirectOK.jsp
   |    <%pageContext.forward("WEB-INF/jsp/ok.jsp");%>
   +- redirectBAD.jsp
   |    <%pageContext.forward("WEB-INF/jsp/bad.html");%>
   +- WEB-INF -+- web.xml
               | <web-app>
               | </web-app>
               +- jsp -+- ok.jsp
                       | <HTML>
                       |  <BODY>
                       |   <H1>ok.jsp</H1>
                       |  </BODY>
                       | </HTML>
                       +- bad.html
                         </HTML> --
To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <> Get more from
the Web.  FREE MSN Explorer download :

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message