tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <>
Subject Re: getting the error type/code
Date Sat, 07 Aug 2004 23:54:42 GMT
Its in 'Table SRV.9-1 Request Attributes and their types' of the servlet spec:

Request Attributes Type
javax.servlet.error.status_code java.lang.Integer
javax.servlet.error.exception_type java.lang.Class
javax.servlet.error.message java.lang.String
javax.servlet.error.exception java.lang.Throwable
javax.servlet.error.request_uri java.lang.String
javax.servlet.error.servlet_name java.lang.String

So look in the ServletRequest() an attribute called 
"javax.servlet.error.status_code" of type Integer.


Charles N. Harvey III wrote:

> Hello.
> If I create one error page and point all of the error codes
> (400, 401, 403, 404, 408, 500) to the same page, how do I figure
> out which error code was sent so I can display a different message
> to the user?
> Can this be done or do I have to create a separate page for each
> error code?  Is the error in the HttpServletRequest somewhere?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message