O'Reilly logo

PrimeFaces Cookbook - Second Edition by Oleg Varaksin, Mert Çalışkan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Possibilities for exception handling in PrimeFaces

PrimeFaces provides powerful exception handling for AJAX and non-AJAX requests out of the box. The mapping between error pages and exception types is configured via the error-page ability in web.xml. Exceptions for AJAX requests can also be configured via the special p:ajaxExceptionHandler tag in order for them to be shown on the same page where they occurred. An implicit object, pfExceptionHandler, provides useful information about exception details.

In this recipe, we will give helpful tips about configuration details and demonstrate PrimeFaces' exception handling for AJAX and non-AJAX requests.

Getting ready

In order to be able use the exception handling, a special EL resolver and a factory class ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required