tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Will Stranathan <w...@thestranathans.com>
Subject Re: where to find the class's names
Date Wed, 03 Oct 2001 00:24:25 GMT
javax.servlet.error.request_uri is a key that accesses a value stored in 
the request somewhere (presumably from a servlet that forwards to this 
JSP).  There is no class javax.servlet.error.request_uri.

So there's probably a servlet that actually forwards to this JSP that 
looks something like:

request.setAttribute("javax.servlet.error.request_uri", 
"some_error_page.jsp");
getRequestDispatcher("the_jsp_you_are_reading.jsp").forward(request, 
response);

Will Stranathan

Craig R. McClanahan wrote:

> 
> On Tue, 2 Oct 2001, Huaxin wrote:
> 
> 
>>Date: Tue, 2 Oct 2001 17:09:53 -0600 (Mountain Daylight Time)
>>From: Huaxin <hxzhang@cs.ualberta.ca>
>>Reply-To: tomcat-user@jakarta.apache.org
>>To: tomcat-user@jakarta.apache.org
>>Subject: where to find the class's names
>>
>>I see this usage of attribute as below:
>>
>>  <%
>>    String requestURI = (String)
>>     request.getAttribute("javax.servlet.error.request_uri");
>>  %>
>>
>>Could anybody tell me where is that javax.servlet.error.request_uri
>>defined?
>>
>>
> 
> Note that this is not the name of a *class* - it is the name of a *request
> attribute*.
> 
> It's defined in the Servlet Specification, which you can download from:
> 
>   http://java.sun.com/products/servlet/download.html
> 
> In the 2.3 spec, see Section 9.9.
> 
> Basically, if you declare an <error-page> to handle a particular type of
> exception or HTTP status code thrown by your servlet, the container will
> set a number of request attributes for you before calling your error page.
> In particular, the attribute you describe above tells you what request URI
> caused the error to occur - other attributes include things like the
> exception that was thrown.
> 
> Craig McClanahan
> 
> 
> 



Mime
View raw message