Uploaded image for project: 'JBoss WFK 2'
  1. JBoss WFK 2
  2. WFK2-493

Seam cannot propagate FacesMessage after session timeout and ajax request

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.5.0.ER1
    • Fix Version/s: None
    • Component/s: Seam 2
    • Labels:
      None
    • Target Release:
    • Steps to Reproduce:
      Hide

      1. Extract and compile (mvn clean package) attached project.
      2. Deploy and access localhost:8080/test
      3. Wait cca 1 minute, until session is expired (you can check following message: ************* SESSION DESTROYED in the server log)
      4.Click on "Invoke testAction.testAction() by a4j:commandButton" button.
      5. Notice there's no faces message "Your session has timed out, please try again."

      Show
      1. Extract and compile (mvn clean package) attached project. 2. Deploy and access localhost:8080/test 3. Wait cca 1 minute, until session is expired (you can check following message: ************* SESSION DESTROYED in the server log) 4.Click on "Invoke testAction.testAction() by a4j:commandButton" button. 5. Notice there's no faces message "Your session has timed out, please try again."
    • Affects:
      Release Notes
    • Release Notes Docs Status:
      Documented as Known Issue
    • Release Notes Text:
      Hide
      When sending Ajax requests to an expired session, Seam will not propagate FacesMessage. As a result, error messages are not displayed when an exception is thrown in Ajax. You can implement an Ajax exception handler by adding the following code in the faces-config.xml file:
      <factory>
          <exception-handler-factory> your_full_ajax_exception_handler</exception-handler-factory>
      </factory>
      Show
      When sending Ajax requests to an expired session, Seam will not propagate FacesMessage. As a result, error messages are not displayed when an exception is thrown in Ajax. You can implement an Ajax exception handler by adding the following code in the faces-config.xml file: <factory>     <exception-handler-factory> your_full_ajax_exception_handler</exception-handler-factory> </factory>
    • Bugzilla Update:
      Perform

      Description

      When you apply ajax request on already expired session (timeout), FacesMessage won't be propagated, because ajax response redirect is created "manually" (see org.jboss.seam.mock.MockExternalContext.redirect(String)) and currently there is no way, how can session containing previous conversation (containing facesMessage) hand over its values to new FacesContext.
      In the case of common request the javax.servlet.http.HttpServletResponse.sendRedirect(String) method is called and after request event is fired by org.apache.catalina.core. StandardWrapperValve.invoke(Request request, Response response), which hands over previous session values to new FacesContext (this can be observed in org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(PhaseEvent)).

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                manaRH Marek Novotny
                Reporter:
                tremes Tomas Remes
                Tester:
                Matous Jobanek
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: