passing RequestPath to error page from web.xml  
Author Message
Rooney





PostPosted: 2006-5-2 18:57:00 Top

java-programmer, passing RequestPath to error page from web.xml 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





PostPosted: 2006-5-17 3:14:00 Top

java-programmer >> passing RequestPath to error page from web.xml "Rooney" <email***@***.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.
--
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)