javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-2136

when using the jsf2 flashscope with faces-redirect=true, pages residing in different directories cannot retrieve the value put in the flash before form submission

    Details

      Description

      I'm try to use the flashscope and have read that the flash scope will survive a redirect.
      The problem is that when the pages are placed in different directories the when using the redirect the value is not available.
      When the pages are in the same directory the value in the flash scope is present.
      When the pages are placed in different directories and the redirect is not used the value is present in the flash scope.

      1. changebundle.txt
        9 kB
        Manfred Riem

        Issue Links

          Activity

          Hide
          bhorst added a comment -

          All sources are available within the war.
          I forgot to state that I'm also using Spring3.0.5, and my IDE is eclipse 3.5.1.

          Cheers benny

          Show
          bhorst added a comment - All sources are available within the war. I forgot to state that I'm also using Spring3.0.5, and my IDE is eclipse 3.5.1. Cheers benny
          Hide
          Patrick Dobler added a comment -

          I've been struggling around with the very same problem, but didn't find the time yet to locate the bug in mojarra-2.1.2

          Show
          Patrick Dobler added a comment - I've been struggling around with the very same problem, but didn't find the time yet to locate the bug in mojarra-2.1.2
          Hide
          arjan tijms added a comment -

          The best thing would be that the Flash cookie was set for the directory where the target page resides (and also includes any page parameters that happen to be used, but perhaps that's a topic for a different issue). Spring 3.1 seems to be doing it this way:

          Concurrency issues are possible with this approach, so flash attributes are associated with the path and query parameters of the target redirect URL to minimize this problem.

          See: http://www.infoq.com/news/2011/10/spring-3.1-rc1-release

          Show
          arjan tijms added a comment - The best thing would be that the Flash cookie was set for the directory where the target page resides (and also includes any page parameters that happen to be used, but perhaps that's a topic for a different issue). Spring 3.1 seems to be doing it this way: Concurrency issues are possible with this approach, so flash attributes are associated with the path and query parameters of the target redirect URL to minimize this problem. See: http://www.infoq.com/news/2011/10/spring-3.1-rc1-release
          Hide
          arjan tijms added a comment - - edited

          JAVASERVERFACES-1956 and JAVASERVERFACES-1877 seem to be duplicates of this.

          Show
          arjan tijms added a comment - - edited JAVASERVERFACES-1956 and JAVASERVERFACES-1877 seem to be duplicates of this.
          Hide
          Darious3 added a comment -

          As one of the major new features in JSF 2 that has never really worked correctly, this should really be fixed.

          Show
          Darious3 added a comment - As one of the major new features in JSF 2 that has never really worked correctly, this should really be fixed.
          Hide
          Manfred Riem added a comment -

          Added the servlet context path to the Flash cookie. This way all the Flash requests will be properly rooted. Which means that if you now change directories the Flash scope will work properly.

          Show
          Manfred Riem added a comment - Added the servlet context path to the Flash cookie. This way all the Flash requests will be properly rooted. Which means that if you now change directories the Flash scope will work properly.
          Hide
          Manfred Riem added a comment -

          Applied to 2.1 branch,

          svn commit -m "Make sure Flash cookie has proper path set, r=rogerk"
          Sending jsf-ri\src\main\java\com\sun\faces\context\flash\ELFlash.java
          Adding test\agnostic\flash\src\main\java\com\sun\faces\test\agnostic\flash\Issue2136Bean.java
          Adding test\agnostic\flash\src\main\webapp\issue2136
          Adding test\agnostic\flash\src\main\webapp\issue2136\issue2136.xhtml
          Adding test\agnostic\flash\src\main\webapp\issue2136b
          Adding test\agnostic\flash\src\main\webapp\issue2136b\issue2136b.xhtml
          Adding test\agnostic\flash\src\test\java\com\sun\faces\test\agnostic\flash\Issue2136IT.java
          Transmitting file data .....
          Committed revision 10594.

          Show
          Manfred Riem added a comment - Applied to 2.1 branch, svn commit -m "Make sure Flash cookie has proper path set, r=rogerk" Sending jsf-ri\src\main\java\com\sun\faces\context\flash\ELFlash.java Adding test\agnostic\flash\src\main\java\com\sun\faces\test\agnostic\flash\Issue2136Bean.java Adding test\agnostic\flash\src\main\webapp\issue2136 Adding test\agnostic\flash\src\main\webapp\issue2136\issue2136.xhtml Adding test\agnostic\flash\src\main\webapp\issue2136b Adding test\agnostic\flash\src\main\webapp\issue2136b\issue2136b.xhtml Adding test\agnostic\flash\src\test\java\com\sun\faces\test\agnostic\flash\Issue2136IT.java Transmitting file data ..... Committed revision 10594.
          Hide
          Manfred Riem added a comment - - edited

          Applied to 2.2 trunk,

          svn commit -m "Make sure Flash cookie has proper path set, r=rogerk"
          Sending jsf-ri\src\main\java\com\sun\faces\context\flash\ELFlash.java
          Adding test\agnostic\flash\src\main\java\com\sun\faces\test\agnostic\flash\Issue2136Bean.java
          Adding test\agnostic\flash\src\main\webapp\issue2136
          Adding test\agnostic\flash\src\main\webapp\issue2136\issue2136.xhtml
          Adding test\agnostic\flash\src\main\webapp\issue2136b
          Adding test\agnostic\flash\src\main\webapp\issue2136b\issue2136b.xhtml
          Adding test\agnostic\flash\src\test\java\com\sun\faces\test\agnostic\flash\Issue2136IT.java
          Transmitting file data .....
          Committed revision 10595.

          Show
          Manfred Riem added a comment - - edited Applied to 2.2 trunk, svn commit -m "Make sure Flash cookie has proper path set, r=rogerk" Sending jsf-ri\src\main\java\com\sun\faces\context\flash\ELFlash.java Adding test\agnostic\flash\src\main\java\com\sun\faces\test\agnostic\flash\Issue2136Bean.java Adding test\agnostic\flash\src\main\webapp\issue2136 Adding test\agnostic\flash\src\main\webapp\issue2136\issue2136.xhtml Adding test\agnostic\flash\src\main\webapp\issue2136b Adding test\agnostic\flash\src\main\webapp\issue2136b\issue2136b.xhtml Adding test\agnostic\flash\src\test\java\com\sun\faces\test\agnostic\flash\Issue2136IT.java Transmitting file data ..... Committed revision 10595.
          Hide
          bhorst added a comment -

          Thanx guys! I'll take a look.

          greetz benny

          Show
          bhorst added a comment - Thanx guys! I'll take a look. greetz benny

            People

            • Assignee:
              Manfred Riem
              Reporter:
              bhorst
            • Votes:
              11 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: