Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to get the url of the page causing the 404 in custom error.jsp?  RSS feed

 
James
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In our application when a user types a bad url,
a custom error message is displayed. for this we are using error.jsp.
Now i want to get the user typed url which is causing the 404 error.
When i tried to used request.getHeader("Referer")
it gives the error.jsp url only.
Any idea of how to get the bad url?
thanks.
 
Pauline McNamara
Sheriff
Posts: 4012
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"javabat"
Could you please change your display name to comply with JavaRanch's naming policy? (It's our only rule.) You can make the change quickly right here. Thanks, and welcome to JavaRanch!
Pauline
[ October 08, 2002: Message edited by: Pauline McNamara ]
 
Bill Brasskey
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having this same problem...

We're using Jrun4 w/ IIS web server.

Any nudge in the right direction would be GREATLY appreciated.


Thanks

- Brasskey
[ November 06, 2005: Message edited by: Bill Brasskey ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65828
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Review section SRV 9.9 of the Servlets 2.4 Specification.
 
Bill Brasskey
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This gave me what I needed:

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65828
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cheers!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!