Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2006

Tip: Looking for answers? Try searching our database.

passing RequestPath to error page from web.xml

Thread view: 
Rooney - 02 May 2006 11:57 GMT
Hi,

I have pointed any errors to Error.jsp in my web.xml file (as shown).

      <error-page>

         <error-code>500</error-code>

         <location>/Error.jsp?id=500</location>

      </error-page>

As you can see I also pass the type of error, is there any way I can
pass the RequestPath that resulted in the error in the first place?

Cheers,
Paul
Juha Laiho - 16 May 2006 20:14 GMT
"Rooney" <paulMrooney@googlemail.com> said:
>I have pointed any errors to Error.jsp in my web.xml file (as shown).
>
>       <error-page>
>          <error-code>500</error-code>
>          <location>/Error.jsp?id=500</location>
>       </error-page>

Please don't pass the error id by hand; the servlet container will
already do that for you.

>As you can see I also pass the type of error, is there any way I can
>pass the RequestPath that resulted in the error in the first place?

For this, as well as the other issue, please see SRV.9.9 in Java Servlet
Specification; the chapter describes what the container will provide
for error handling.

The specification can be found here:
http://jcp.org/aboutJava/communityprocess/final/jsr154/index.html

The specification is good read for anyone working with Java web apps.
Signature

Wolf  a.k.a.  Juha Laiho     Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
        PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.