javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-2584

Make ExceptionHandler implementation be lazy to avoid encoding problems

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2.0-m08
    • Component/s: lifecycle
    • Labels:
      None

      Description

      The current implementation of ExceptionHandlerFactory in Mojarra checks isAjaxRequest() in its getExceptionHandler() method and returns AjaxExceptionHandlerImpl or ExceptionHandlerImpl depending on the answer. This is too early to make this check because isAjaxRequest() will need to now need to check a request parameter for the iframe impl of JAVASERVERFACES_SPEC_PUBLIC-802. One answer is to have the ExceptionHandlerFactory return an instance of ExceptionHandlerWrapper that has a getWrapped() that does the check and returns the proper instance, ajax or non-ajax.

        Issue Links

          Activity

          Hide
          Ed Burns added a comment -

          Use the lazy strategy for choosing which exceptionHandler to use

          SECTION: Modified Files
          ----------------------------
          M jsf-ri/src/main/java/com/sun/faces/context/ExceptionHandlerFactoryImpl.java

          • Make getExceptionHandler() return a wrapper that does the ajax/no-ajax
            switching lazily.

          A jsf-ri/src/main/java/com/sun/faces/context/AjaxNoAjaxExceptionHandler.java

          • Do the ajax/no-ajax switching in getWrapped().

          Adding jsf-ri/src/main/java/com/sun/faces/context/AjaxNoAjaxExceptionHandler.java
          Sending jsf-ri/src/main/java/com/sun/faces/context/ExceptionHandlerFactoryImpl.java
          Transmitting file data ..
          Committed revision 11294.

          Show
          Ed Burns added a comment - Use the lazy strategy for choosing which exceptionHandler to use SECTION: Modified Files ---------------------------- M jsf-ri/src/main/java/com/sun/faces/context/ExceptionHandlerFactoryImpl.java Make getExceptionHandler() return a wrapper that does the ajax/no-ajax switching lazily. A jsf-ri/src/main/java/com/sun/faces/context/AjaxNoAjaxExceptionHandler.java Do the ajax/no-ajax switching in getWrapped(). Adding jsf-ri/src/main/java/com/sun/faces/context/AjaxNoAjaxExceptionHandler.java Sending jsf-ri/src/main/java/com/sun/faces/context/ExceptionHandlerFactoryImpl.java Transmitting file data .. Committed revision 11294.
          Show
          Ed Burns added a comment - Safe to mark closed when < http://hudson-sca.us.oracle.com/view/MOJARRA_ALL/job/MOJARRA_TRUNK_GLASSFISH_3_1_2_2_NO_CLUSTER/113/ > and < http://tim-vm9.us.oracle.com:7070/hudson/view/Mojarra%20Trunk/job/trunk-test-glassfish-3_1_2_2/51/ > are clean.

            People

            • Assignee:
              Ed Burns
              Reporter:
              Ed Burns
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 5 hours
                5h
                Remaining:
                Remaining Estimate - 5 hours
                5h
                Logged:
                Time Spent - Not Specified
                Not Specified