ICEfaces
  1. ICEfaces
  2. ICE-9234

Ability to specify Exception types and redirect values for Ajax responses

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.3
    • Fix Version/s: 4.0
    • Component/s: Bridge
    • Labels:
      None
    • Environment:
      JSF
    • Assignee Priority:
      P3
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.)

      Description

      JavaEE applications can specify a location for the container to redirect to when an exception is detected on the server. This is done in the web.xml using:

      <error-page>
          <exception-type>org.mycompany.myproduct.MyException</exception-type>
          <location>error.html</location>
      </error-page>>

      However, this does not work when using JSF with Ajax. Any exceptions are propagated back to the client as part of the Ajax response so the container never sees them.

      ICEfaces has a feature where you can specify a context parameter:

      <context-param>
          <param-name>org.icefaces.sessionExpiredRedirectURI</param-name>
          <param-value>error.html</param-value>
      </context-param>

      However, this only applies to a single use case. If the exception is not specifically an org.icefaces.application.SessionExpiredException, nothing will happen. This can be a problem if a session expiry leads to a different exception. I recommend looking at ICE-9224 for additional details about this issue.

      This JIRA recommends that the current ICEfaces feature be expanded to allow developers to declare multiple exceptions and redirection locations - basically providing the same functionality as error-page declarations but that would work with Ajax responses.

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #41319 Tue Jun 10 11:32:12 MDT 2014 mircea.toma ICE-9234 Implemented general redirect on exception feature.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/core/src/main/java/org/icefaces/util/EnvUtils.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/core/src/main/resources/META-INF/faces-config.xml
        Commit graph ADD /icefaces4/trunk/icefaces/core/src/main/java/org/icefaces/impl/application/RedirectOnExceptionHandler.java

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Deryk Sinotte
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: