Uploaded image for project: 'MyFaces Portlet Bridge'
  1. MyFaces Portlet Bridge
  2. PORTLETBRIDGE-43

MyFaces action handling sometimes fails with exception from ExternalContext setRequestCharacterSetEncoding

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0.0-beta, 2.0.0-alpha
    • 1.0.0-beta, 2.0.0-alpha
    • Impl
    • None

    Description

      In some configurations (noteably when Facelets is used), an exception is thrown when MyFaces tries to set the request character encoding during an action. The exception claims that the request (parameters) have already been read and hence one can't do this set. This occurs because the Bridge reads the request parameters during ExternalContext construction to determine the view target of the request (if encodes this target in a render parameter). Fix is to delay determining the view until Faces actually tries to determine it itself. I.e. Don't resolve the view until either EC.getRequestPathInfo or EC.getRequestServletPath are called. Note: because at least older version of the Faces RI we support don't call these (in the portlet case) but rather relies on a request attribute being set – the bridge must also detect/resolve the view for this case as well.

      Attachments

        Activity

          People

            mike_freedman Michael Freedman
            mike_freedman Michael Freedman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: