Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-1853

ErrorPageWriter causes Facelets/MyFaces confusion

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.2
    • 1.1.6
    • General
    • None
    • MyFaces 1.2.2
      Facelets 1.1.3
      Tomcat 6.0.14

    Description

      I just stumbled upon some weired problem. I have a rather basic myfaces
      1.2.2 + facelets 1.1.3 setup. What I tried to achieve, is to NOT have
      either Facelets nor MyFaces handle any of the error 500 scenarios.

      Right now, in case of error 500 I have a facelets error page. "An Error
      Occured", and collapsable trees for the components etc. You know the
      drill.

      So I decided to disable debugging in facelets, by switching
      context-parameter facelets.DEVELOPMENT to false. This was the first moment
      I got confused, because devmode was already disabled.

      BUT: The error page definetly states "Generated by Facelets" in the lower
      right corner.

      I spent the last hour tracking this down. So far I have confirmed that the
      FaceletsViewHandler does not trigger the generation of said errorpage. So
      I searched some more, and found javax.faces.webapp._ErrorPageWriter to be
      the culprit. The problem is, that it seems to be a copy of the Facelets
      DevTools class. And furthermore the filename of the error-template has
      been copied as well. It's

      "META-INF/rsc/facelet-dev-error.xml"

      on both myfaces as well as facelets. I have checked the template included
      with myfaces and it is clearly different from the one included with
      facelets. So my best guess right now (I have not confirmed this any
      further) is, that MyFaces loads the template from facelets.jar due to some
      unlucky webapp classloader situation.

      Although the solution to my current problem is most likely to just disable
      debugging in myfaces as well, I would like to strongly advise to change
      the filename of the MyFaces error-template. This really confused me a lot.

      Attachments

        Activity

          People

            lu4242 Leonardo Uribe
            m_hess Michael Heß
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: