You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Anthony Hong <an...@gmail.com> on 2006/05/26 03:38:08 UTC

How to redirect to an error page when JSF page failed

In jsp with servlet, I define error page configuration in web.xml to
redirect to an error page when error occured.
  <error-page>
        <exception-type>java.lang.Exception</exception-type>
        <location>/errorpages/error500.jsp</location>
    </error-page>

But in JSF page, it doesn't work. How should I configurate?

-- 

Anthony Hong

Re: How to redirect to an error page when JSF page failed

Posted by Anthony Hong <an...@gmail.com>.
Thanks, That's a useful resource

On 5/29/06, Mert Çalışkan <mc...@gmail.com> wrote:
>
> This could be a solution for you.
>
> http://www.jroller.com/page/mert?entry=handling_errors_with_an_errror
>
> Regards,
>
> Mert
>
>
> On 5/26/06, Anthony Hong <anthony.bin.hong@gmail.com > wrote:
> > In jsp with servlet, I define error page configuration in web.xml to
> > redirect to an error page when error occured.
> > <error-page>
> >        <exception-type>java.lang.Exception</exception-type>
> >        <location>/errorpages/error500.jsp</location>
> >    </error-page>
> >
> > But in JSF page, it doesn't work. How should I configurate?
> >
> > --
> >
> > Anthony Hong
> >
>
>


-- 

Anthony Hong

Re: How to redirect to an error page when JSF page failed

Posted by Mert Çalışkan <mc...@gmail.com>.
This could be a solution for you.

http://www.jroller.com/page/mert?entry=handling_errors_with_an_errror

Regards,

Mert


On 5/26/06, Anthony Hong <anthony.bin.hong@gmail.com > wrote:
>
> In jsp with servlet, I define error page configuration in web.xml to
> redirect to an error page when error occured.
> <error-page>
>        <exception-type>java.lang.Exception</exception-type>
>        <location>/errorpages/error500.jsp</location>
>    </error-page>
>
> But in JSF page, it doesn't work. How should I configurate?
>
> --
>
> Anthony Hong
>

Re: How to redirect to an error page when JSF page failed

Posted by Anthony Hong <an...@gmail.com>.
I use facelet, that means error page should be written in JSF instead
of another web page?

On 5/26/06, Julian Ray <ju...@yahoo.com> wrote:
> This is in our web.xml
>
>        <error-page>
>                <error-code>500</error-code>
>                <location>/ErrorDisplay.jsf</location>
>        </error-page>
>
> But there is a bug in the JSF framework which requires the error page to use
> a f:subview rather than a f;view tag. There is a good discussion on this in
> the MyFaces book.
>
>
> -----Original Message-----
> From: Anthony Hong [mailto:anthony.bin.hong@gmail.com]
> Sent: Thursday, May 25, 2006 9:38 PM
> To: MyFaces Discussion
> Subject: How to redirect to an error page when JSF page failed
>
> In jsp with servlet, I define error page configuration in web.xml to
> redirect to an error page when error occured.
>  <error-page>
>        <exception-type>java.lang.Exception</exception-type>
>        <location>/errorpages/error500.jsp</location>
>    </error-page>
>
> But in JSF page, it doesn't work. How should I configurate?
>
> --
>
> Anthony Hong
>
>


-- 

Anthony Hong

Re: How to redirect to an error page when JSF page failed

Posted by Cagatay Civici <ca...@gmail.com>.
Checkout the following;

http://www.jroller.com/page/mert?entry=handling_errors_with_an_errror

Cagatay

On 5/27/06, Julian Ray <ju...@yahoo.com> wrote:
>
> Hi Anthony,
>
> I was refering to Chapter 12 (pg 595) of "Core JavaServer Faces" by Geary
> &
> Horstman published by Sun Microsystems.
>
> -----Original Message-----
> From: Anthony Hong [mailto:anthony.bin.hong@gmail.com]
> Sent: Saturday, May 27, 2006 12:07 PM
> To: MyFaces Discussion
> Subject: Re: How to redirect to an error page when JSF page failed
>
> Hi Julian,
>
> Can you give me the link of dicussion this problem?
> That will be nice If any example I can read.
> Thanks.
>
> On 5/26/06, Julian Ray <ju...@yahoo.com> wrote:
> > This is in our web.xml
> >
> >        <error-page>
> >                <error-code>500</error-code>
> >                <location>/ErrorDisplay.jsf</location>
> >        </error-page>
> >
> > But there is a bug in the JSF framework which requires the error page
> > to use a f:subview rather than a f;view tag. There is a good
> > discussion on this in the MyFaces book.
> >
> >
> > -----Original Message-----
> > From: Anthony Hong [mailto:anthony.bin.hong@gmail.com]
> > Sent: Thursday, May 25, 2006 9:38 PM
> > To: MyFaces Discussion
> > Subject: How to redirect to an error page when JSF page failed
> >
> > In jsp with servlet, I define error page configuration in web.xml to
> > redirect to an error page when error occured.
> >  <error-page>
> >        <exception-type>java.lang.Exception</exception-type>
> >        <location>/errorpages/error500.jsp</location>
> >    </error-page>
> >
> > But in JSF page, it doesn't work. How should I configurate?
> >
> > --
> >
> > Anthony Hong
> >
> >
>
>
> --
>
> Anthony Hong
>
>

RE: How to redirect to an error page when JSF page failed

Posted by Julian Ray <ju...@yahoo.com>.
Hi Anthony,

I was refering to Chapter 12 (pg 595) of "Core JavaServer Faces" by Geary &
Horstman published by Sun Microsystems. 

-----Original Message-----
From: Anthony Hong [mailto:anthony.bin.hong@gmail.com] 
Sent: Saturday, May 27, 2006 12:07 PM
To: MyFaces Discussion
Subject: Re: How to redirect to an error page when JSF page failed

Hi Julian,

Can you give me the link of dicussion this problem?
That will be nice If any example I can read.
Thanks.

On 5/26/06, Julian Ray <ju...@yahoo.com> wrote:
> This is in our web.xml
>
>        <error-page>
>                <error-code>500</error-code>
>                <location>/ErrorDisplay.jsf</location>
>        </error-page>
>
> But there is a bug in the JSF framework which requires the error page 
> to use a f:subview rather than a f;view tag. There is a good 
> discussion on this in the MyFaces book.
>
>
> -----Original Message-----
> From: Anthony Hong [mailto:anthony.bin.hong@gmail.com]
> Sent: Thursday, May 25, 2006 9:38 PM
> To: MyFaces Discussion
> Subject: How to redirect to an error page when JSF page failed
>
> In jsp with servlet, I define error page configuration in web.xml to 
> redirect to an error page when error occured.
>  <error-page>
>        <exception-type>java.lang.Exception</exception-type>
>        <location>/errorpages/error500.jsp</location>
>    </error-page>
>
> But in JSF page, it doesn't work. How should I configurate?
>
> --
>
> Anthony Hong
>
>


-- 

Anthony Hong


Re: How to redirect to an error page when JSF page failed

Posted by Anthony Hong <an...@gmail.com>.
Hi Julian,

Can you give me the link of dicussion this problem?
That will be nice If any example I can read.
Thanks.

On 5/26/06, Julian Ray <ju...@yahoo.com> wrote:
> This is in our web.xml
>
>        <error-page>
>                <error-code>500</error-code>
>                <location>/ErrorDisplay.jsf</location>
>        </error-page>
>
> But there is a bug in the JSF framework which requires the error page to use
> a f:subview rather than a f;view tag. There is a good discussion on this in
> the MyFaces book.
>
>
> -----Original Message-----
> From: Anthony Hong [mailto:anthony.bin.hong@gmail.com]
> Sent: Thursday, May 25, 2006 9:38 PM
> To: MyFaces Discussion
> Subject: How to redirect to an error page when JSF page failed
>
> In jsp with servlet, I define error page configuration in web.xml to
> redirect to an error page when error occured.
>  <error-page>
>        <exception-type>java.lang.Exception</exception-type>
>        <location>/errorpages/error500.jsp</location>
>    </error-page>
>
> But in JSF page, it doesn't work. How should I configurate?
>
> --
>
> Anthony Hong
>
>


-- 

Anthony Hong

RE: How to redirect to an error page when JSF page failed

Posted by Julian Ray <ju...@yahoo.com>.
This is in our web.xml

	<error-page>
		<error-code>500</error-code>
		<location>/ErrorDisplay.jsf</location>
	</error-page>

But there is a bug in the JSF framework which requires the error page to use
a f:subview rather than a f;view tag. There is a good discussion on this in
the MyFaces book.
 

-----Original Message-----
From: Anthony Hong [mailto:anthony.bin.hong@gmail.com] 
Sent: Thursday, May 25, 2006 9:38 PM
To: MyFaces Discussion
Subject: How to redirect to an error page when JSF page failed

In jsp with servlet, I define error page configuration in web.xml to
redirect to an error page when error occured.
  <error-page>
        <exception-type>java.lang.Exception</exception-type>
        <location>/errorpages/error500.jsp</location>
    </error-page>

But in JSF page, it doesn't work. How should I configurate?

-- 

Anthony Hong