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

Weird behavior with form authencation / forward / restore view

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • None
    • None
    • None
    • None

    Description

      Following case:

      1) visit login.xhtml
      with
      <h:form onclick="this.action='j_security_check';">
      <p:inputText id="j_username" />
      <p:password id="j_password" />
      <p:commandButton id="submit" value="Login" ajax="false"/>
      </h:form>
      2) submit (non-ajax post) with invalid user
      3) tomcat forwards to the loginError.xhtml
      4) MyFaces tries to restore the view with the ViewState from login.xhtml
      5) ViewExpired occurs

      IMO MyFaces should not restore the view after a forward ->

      if (post && forward) {
      -> new view
      }
      else {
      -> restore
      }

      It also works fine in Mojarra.

      lu4242 How would you fix it?

      Attachments

        Activity

          People

            lu4242 Leonardo Uribe
            tandraschko Thomas Andraschko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: