Code Comments
Programming Forum and web based access to our favorite programming groups.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 -- Message posted via http://www.webservertalk.com
Post Follow-up to this message"Tom Vercauteren via webservertalk.com" <forum@nospam.webservertalk.com> writes:
> 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
Post Follow-up to this messageThank you, thank you, thank you. And also thank you for the link. I think i gonne find a lot of information on that site!!! -- Message posted via http://www.webservertalk.com
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.