On Tue, 31 Jul 2001, Mark Phelps wrote:
> You can catch all exceptions and forward them to the error page
> yourself. That would allow you to pass a parameter to the error
> page indicating the source of the error.
This certainly would fix the problem I am having with the
request.getRequestURI() method. Another workaround would be to
set a session variable with the original request URI and then
retrieve it in my error page. However, both solutions seem to
defeat the purpose of the error page directive--to be able to
make a reusable error page with adding extra code to each
standard jsp page.
The Servlet 2.2 API at
http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/ht
tp/HttpServletRequest.html#getRequestURI() defines getRequestURI
as the following action:
Returns the part of this request's URL from the
protocol name up to the query string in the first line
of the HTTP request
The subsequent examples demonstrate that the method
should return exactly what was sent in the original HTTP request.
As I wrote in my earlier message, JRun will return the URI of the
error page, not the original URI. Is this a bug in JRun? Can
anyone test it under a different JSP implementation?
Barring making modifications to every JSP file that
references the error page, does anyone have any suggestions on
what code I could write in the error file in order to reference
the original request URI? I don't really care if it is parsed, I
am just interested in finding out the original HTTP request from
the error page. I have not been able to find a way to reference
the original request or pageContext objects from an error page.
Thanks,
Sam Greenfield
Senior System Engineer
Sports Illustrated
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists