1

I am using JSF 1.2.

I would like to be able to catch the JSF internal exceptions to produce a better looking error page and maybe try to re-load the session (Using backing bean data)

How Can I do this?

Thanks!

Ben
  • 10,020
  • 21
  • 94
  • 157

1 Answers1

0

You didn't mention what version of JSF you are using, but in JSF 2.0 all JSF exceptions thrown by the framework are being published as events and handled by a global ExceptionHandler. You can replace this with your own implementation in faces-config.xml:

<exception-handlerfactory>
   com.foo.myExceptionHandler
</exception-handlerfactory>

See this answer for some additional details: Differences between action and actionListener

Community
  • 1
  • 1
Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
  • Your right. I'm using 1.2 but I will definitely check on how to upgrade to 2.0 without causing too much trouble. – Ben Jan 23 '11 at 10:59