1 Reply Latest reply on Sep 3, 2008 1:35 PM by Pete Muir

    Exceptions in JSF render phase

    Christian Lauer Newbie

      Hi all,


      I've got a general problem regarding error handling in JSF render phase. When an executed EL expression in a JSF page causes an error, the exception handling definitions in pages.xml are not respected. In these cases a debug view is always rendered (no redirect).


      Here's an excerpt from the stack trace.
      javax.el.ELException:...
           at com.sun.facelets.compiler.TextInstruction.write(TextInstruction.java:48)
           at com.sun.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:39)
           at com.sun.facelets.compiler.UILeaf.encodeAll(UILeaf.java:149)
           at javax.faces.component.UIComponent.encodeAll(UIComponent.java:890)
           at javax.faces.component.UIComponent.encodeAll(UIComponent.java:890)
           at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
           at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
           at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:189)
           at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
           at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
           at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
      ...


      How can I cleanly handle those exceptions?


      Best regards,
      Christian