Uploaded image for project: 'Struts 1'
  1. Struts 1
  2. STR-2939

Provide a conversation scope (syn: Flash scope, dialog scope) object to store data between requests.



    • Type: Improvement
    • Status: In Progress
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Future
    • Component/s: Core
    • Labels:


      In addition to standard J2EE scopes (page for JSP, request, session and application) provide a new scope object that would hold data between requests. Similar facilities in Tapestry and Stripes are called FlashScope, Struts 1 will call it as Conversation Scope.

      Physically, this object will be stored in the session object. It will allow the same get/set/remove operations as other scopes. The objects placed in this scope will be removed two roundtrips after they were placed (they are intended to be used after the first roundtrip). The object lifetime can be increased by increasing a corresponding roundtrip counter.

      Struts 1.2.x introduced storing messages in the session with their automatic cleanup after they are used, usually in a JSP page. Therefore, Struts 1.2.x has a rudimentary Conversation Scope for messages only. Retrofit mesage handling, queue messages to Conversation scope.

      • Provide direct access to Conversation scope from Action (create a method)
      • Update saveMessages to accept Conversation scope
      • For classes other than Action provide an utility method in RequestUtils
      • Allow using Conversation scope in an action mapping definition for ActionForms.

      From developer's point of view usage of ActionForms in Conversation scope + redirect to view should be similar to usage of ActionForms in request scope and forwarding to view. Ideally it should be possible to retrofit statelless actions that forward to JSPs to Conversation actions that redirect to views by only changing the scope of an ActionForm in an action mapping.

      What the whole thing is for? To be able to use redirection without worrying about garbage in the session. Redirection allows to provide better user experience, in particular related to navigation and double submit.


          Issue Links



              • Assignee:
                jmikus@gmail.com Michael Jouravlev
              • Votes:
                0 Vote for this issue
                1 Start watching this issue


                • Created: