Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Redirecting error page 404...
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

Report this thread to moderator Post Follow-up to this message
Old Post
Tom Vercauteren via webservertalk.com
04-26-05 09:02 PM


Re: Redirecting error page 404...
"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

Report this thread to moderator Post Follow-up to this message
Old Post
Tor Iver Wilhelmsen
04-27-05 09:01 PM


Re: Redirecting error page 404...
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!!!

--
Message posted via http://www.webservertalk.com

Report this thread to moderator Post Follow-up to this message
Old Post
Tom Vercauteren via webservertalk.com
04-28-05 01:58 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Java Help archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:36 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.