tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: where to find the class's names
Date Tue, 02 Oct 2001 23:21:31 GMT


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