You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Zohar <da...@hotmail.com> on 2006/05/18 12:55:23 UTC
error page
Hello,
I'm trying to use the error handling mechanism described in http://java.sun.com/developer/EJTechTips/2003/tt0114.html.
When an exception in thrown in JSP1 it is indeed redirected to JSP2. in JSP2 I've put "System.out.println(exception.getMessage());" and sure enough the exception's message is printed. But what I get as a response to the browser is "HTTP 500".
Can anyone please help me with this?
Thanks,
Zohar.
Re: error page
Posted by Hassan Schroeder <ha...@gmail.com>.
On 5/18/06, Zohar <da...@hotmail.com> wrote:
> When an exception in thrown in JSP1 it is indeed redirected to JSP2. in JSP2 I've put "System.out.println(exception.getMessage());" and sure enough the exception's message is printed. But what I get as a response to the browser is "HTTP 500".
Sounds correct to me -- that's the error code. Are you saying that
your JSP2 error page doesn't generate any visible output?
Is it possible you're using MS IE and your page's output falls below
the "show friendly (sic) messages" threshold?
--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: error page
Posted by Len Popp <le...@gmail.com>.
It could be that the error page itself is throwing an error. Try using
an ultra-simple error page.
--
Len
On 5/18/06, Zohar <da...@hotmail.com> wrote:
> No, I've used the "Letting a page define its error page" option.
>
> ----- Original Message -----
> From: "Franck Borel" <bo...@ub.uni-freiburg.de>
> To: "Tomcat Users List" <us...@tomcat.apache.org>
> Sent: Thursday, May 18, 2006 14:20
> Subject: Re: error page
>
>
> > >
> >> I'm trying to use the error handling mechanism described in
> >> http://java.sun.com/developer/EJTechTips/2003/tt0114.html.
> >> When an exception in thrown in JSP1 it is indeed redirected to JSP2. in
> >> JSP2 I've put "System.out.println(exception.getMessage());" and sure
> >> enough the exception's message is printed. But what I get as a response
> >> to the browser is "HTTP 500".
> >>
> >
> > Have you make an entry like this in your Web deployment descriptor
> > (web.xml)?
> >
> > <!-- Catch a system error using an HTML page -->
> > <error-page>
> > <exception-type>your.exception.
> > </exception-type>
> > <location>/JSP2.jsp</location>
> > </error-page>
> >
> >
> > -- Franck
> >
> >
> >
>
>
> --------------------------------------------------------------------------------
>
>
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: error page
Posted by Zohar <da...@hotmail.com>.
No, I've used the "Letting a page define its error page" option.
----- Original Message -----
From: "Franck Borel" <bo...@ub.uni-freiburg.de>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Thursday, May 18, 2006 14:20
Subject: Re: error page
> >
>> I'm trying to use the error handling mechanism described in
>> http://java.sun.com/developer/EJTechTips/2003/tt0114.html.
>> When an exception in thrown in JSP1 it is indeed redirected to JSP2. in
>> JSP2 I've put "System.out.println(exception.getMessage());" and sure
>> enough the exception's message is printed. But what I get as a response
>> to the browser is "HTTP 500".
>>
>
> Have you make an entry like this in your Web deployment descriptor
> (web.xml)?
>
> <!-- Catch a system error using an HTML page -->
> <error-page>
> <exception-type>your.exception.
> </exception-type>
> <location>/JSP2.jsp</location>
> </error-page>
>
>
> -- Franck
>
>
>
--------------------------------------------------------------------------------
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: error page
Posted by Franck Borel <bo...@ub.uni-freiburg.de>.
>
> I'm trying to use the error handling mechanism described in http://java.sun.com/developer/EJTechTips/2003/tt0114.html.
> When an exception in thrown in JSP1 it is indeed redirected to JSP2. in JSP2 I've put "System.out.println(exception.getMessage());" and sure enough the exception's message is printed. But what I get as a response to the browser is "HTTP 500".
>
Have you make an entry like this in your Web deployment descriptor
(web.xml)?
<!-- Catch a system error using an HTML page -->
<error-page>
<exception-type>your.exception.
</exception-type>
<location>/JSP2.jsp</location>
</error-page>
-- Franck