This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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: 63211

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] [Bear's FrontMan] [About Bear] [Books by Bear]
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Error Handler
jQuery in Action, 3rd edition