Hi,
How is your <error-page> named?
I use JSP and have found, that the <error-page> itself has to be a
.jsp-file.
With .html it did not work (Tomcat 3.2b6). Haven't tested 3.2 (final).
But I don't expect any changes.
Try to name your error-page a .jsp-file and retry it. Perhaps it works.
regards,
Thomas
-----Ursprüngliche Nachricht-----
Von: Pankaj Bhagat [mailto:[EMAIL PROTECTED]]
Gesendet am: Dienstag, 12. Dezember 2000 12:59
An: [EMAIL PROTECTED]
Betreff: Re: Custom error pages!!
Thanks for your response. The solution really sounds good.
But just for information, can you comment on the <error-pages> tag not
working in the deployment descriptor of Tomcat 3.2
Anybody else who has been successful with this can also plese comment.
Regards
Pankaj
----- Original Message -----
From: "Kief Morris" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 12, 2000 12:26 PM
Subject: Re: Custom error pages!!
> Pankaj Bhagat typed the following on 11:58 12/12/2000 +0100
> >So now what i can understand is that it should be Tomcat's problem to
> >intercept any errors occuring in the servlet and then passing me onto the
> >specified url in the deployment descriptor.
>
> I believe this only applies to JSP pages. For your servlet, you should
just
> catch it normally:
>
> public void doGet (...)
> {
> try {
> // your code here
> } catch (Throwable e) {
> // forward to an error page
> }
> // write headers and output
> }
>
> If you want to take advantage of JSP error page handling, a slick thing to
do
> might be to insert the Throwable object into the request as an attribute
> named "javax.servlet.jsp.jspException", then forward to a JSP page whose
> page directive includes the parameter isErrorPage="true". This will
automatically
> create a variable called "exception" in the error page, which will be a
reference
> to the Throwable object you set in the request.
>
> Check out section 2.7.1 of the JSP specification document for details on
how
> this works.
>
> Kief
>
> ---
> bitBull makes the Internet bite:
http://www.bitBull.com/demos/
>