• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error Handler

 
EM. Lashkar
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
request.getRequestURI()
gives me the file name of the error page .
Any suggestion ?
Thanks.
ML
 
Mark Howard
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Mark.
 
EM. Lashkar
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
ML
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What Mark listed were request attributes, not packages. You should be able to access them on the error page via request.getAttribute().
hth,
bear
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic