Forums Register Login

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

+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
"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 ]
+Pie Number of slices to send: Send
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 ]
+Pie Number of slices to send: Send
Review section SRV 9.9 of the Servlets 2.4 Specification.
+Pie Number of slices to send: Send
This gave me what I needed:

+Pie Number of slices to send: Send
Cheers!
We cannot change unless we survive, but we will not survive unless we change. Evolving tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1144 times.
Similar Threads
custom 404 error page
Avoid 404 error in request and responce object
custom error page ?
404 prob.
Catching HTTP Error Responses
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 03:58:44.