• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 4012
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This gave me what I needed:

 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Cheers!
reply
    Bookmark Topic Watch Topic
  • New Topic