You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Huaxin <hx...@cs.ualberta.ca> on 2001/10/03 01:09:53 UTC

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?




Re: where to find the class's names

Posted by Mikael Aronsson <mi...@telia.com>.
Hi !

The easiest thing would be to do as you where told when you subscribed to
the list, there is no reason to use that kind of language here.

"Please save this message so that you know the address you are
subscribed under, in case you later want to unsubscribe or change your
subscription address."

...

To remove your address from the list, send a message to:
   <to...@jakarta.apache.org>

That's it.
Mikael

----- Original Message -----
From: "Alexandru ANDREI" <al...@fx.ro>
To: <to...@jakarta.apache.org>
Sent: Wednesday, October 03, 2001 10:26 AM
Subject: RE: where to find the class's names


> dear list ...
> HOW THE HELL CAN I UNSUBSCRIBE FROM THIS LIST ???
> Or at least to switch to digest mode ?
>
> -----Original Message-----
> From: Huaxin [mailto:hxzhang@cs.ualberta.ca]
> Sent: Tuesday, October 02, 2001 4:10 PM
> 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?
>
>


RE: where to find the class's names

Posted by Alexandru ANDREI <al...@fx.ro>.
dear list ...
HOW THE HELL CAN I UNSUBSCRIBE FROM THIS LIST ???
Or at least to switch to digest mode ?

-----Original Message-----
From: Huaxin [mailto:hxzhang@cs.ualberta.ca]
Sent: Tuesday, October 02, 2001 4:10 PM
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?



Re: where to find the class's names

Posted by Will Stranathan <wi...@thestranathans.com>.
Doh - please forgive me - I didn't see I was responding to an already 
correct response.  Didn't mean to imply I was smarter than Craig - I 
just can't read.....

Will

Will Stranathan wrote:

> Will Stranathan
> 
> Craig R. McClanahan wrote:
> 
>>
>> On Tue, 2 Oct 2001, Huaxin wrote:
>>



Re: where to find the class's names

Posted by Will Stranathan <wi...@thestranathans.com>.
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 <hx...@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
> 
> 
> 



Re: where to find the class's names

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Tue, 2 Oct 2001, Huaxin wrote:

> Date: Tue, 2 Oct 2001 17:09:53 -0600 (Mountain Daylight Time)
> From: Huaxin <hx...@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