It's not a secret anymore!
The moose likes JSP and the fly likes Error Handler Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Error Handler" Watch "Error Handler" New topic

Error Handler

EM. Lashkar

Joined: Jan 31, 2003
Posts: 9
Hi there ,
I have an error page for the jsp application.
In that error page I need to log the "file name or the URL" of the page that called the error page.
gives me the file name of the error page .
Any suggestion ?

Mark Howard
Ranch Hand

Joined: Feb 14, 2001
Posts: 285
The servlet container makes several request attributes available for the error page. These are:

The javax.servlet.error.request_uri might be the one you're after
EM. Lashkar

Joined: Jan 31, 2003
Posts: 9
Thanks Mark Howard. Seemed to be that these attributes are not availabe for servlet2.2 ( or equivalent version of JSP). In the webSphere that I have access to , the Servlet.jar is missing the javax.servlet.error.* package! So I am stuck.
Again , thanks so much for the direction.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63868

What Mark listed were request attributes, not packages. You should be able to access them on the error page via request.getAttribute().

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Error Handler
jQuery in Action, 3rd edition