Hi,

"pretty sure" isn't always good enough ;) To get the uri that forwarded to the jsp you need to use <%=request.getAttribute("javax.servlet.forward.request_uri")%>. Check out the servlet 2.4 spec section 8.4 for more info.


Trond

Yaakov Chaikin wrote:

Hi,

Using Tomcat 5.5.7 (tried Tomcat 5.5.9 with the same results) on Windows XP.

When forwarding to a JSP page that is located in
/WEB-INF/jsp/success.jsp and calling:
<%= request.getRequestURI() %> inside the success.jsp page, the result I get is:
/WEB-INF/jsp/success.jsp

I am pretty sure that according to the API, this is the wrong result.
It should have returned the URI of the **request**, not the path to
the resource.

Is this a known bug or there is some weird Tomcat setting that I need
to change. I ran this on Tomcat without changing any of the original
settings.

BTW, the same is true of request.getRequestURL(). It returns (peculiar enough):
http://localhost:8080/WEB-INF/jsp/success.jsp

Thanks,
Yaakov.

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







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



Reply via email to