Hi,
i try to make an error page with jsp on a tomcat 5.
Everything is ok, but i only want to show the name of the URL the user has
typed and isn't found.
The code in my jsp is a very simple html page and the part where i show the
url is the following ... :
The resource you are trying to reach, <%= request.getRequestURL()%>,
does not exist on this server.
But when my errorpage shows, i get the name of the error page, not the url
the user has used...
The user types : http://localhost/mytestapp/guess.jsp
and the message shown by the browser = The resource you are trying to
reach, http://localhost/mytestapp/filenotfound.jsp
does not exist on this server.
Anyone any suggestion?
Thank you very much.
Greets,
Tom
PS : i'm using jdk 1.4 & eclipse 3.0
Tor Iver Wilhelmsen - 27 Apr 2005 14:02 GMT
> But when my errorpage shows, i get the name of the error page, not the url
> the user has used...
Correct, that is stored in a different attribute as per the spec:
(String) request.getAttribute("javax.servlet.error.request_uri");
See http://servlets.com/soapbox/servlet23.html
Tom Vercauteren - 28 Apr 2005 07:50 GMT
Thank you, thank you, thank you.
And also thank you for the link. I think i gonne find a lot of information
on that site!!!