Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-42496

JSF state saving is not being configured

    XMLWordPrintable

    Details

    • 19 status:
      Resolved
    • 12 status:
      Won't Fix
    • Property addition/change required:
      Yes
    • Test Plan:
      Hide

      To test this there are 2 ways:

      1. via the client
        • visit a jsf tool (i.e. samigo) that has the state saving set to client
        • inspect the page and look for a hidden input with a name of "javax.faces.ViewState" and verify the value is a blob
        • visit a jsf tool that has state saving set to server and that input field the value will not contain a huge blob
      2. via the server
        • visit a tool with state saving set to server
        • look in the SessionComponent -> tool MyLittleSession -> attributes
        • look for an attribute with the key "com.sun.faces.renderkit.ServerSideStateHelper.LogicalViewMap"
        • a tool where state saving is set to client will not have that attribute

       

       

      Show
      To test this there are 2 ways: via the client visit a jsf tool (i.e. samigo) that has the state saving set to client inspect the page and look for a hidden input with a name of "javax.faces.ViewState" and verify the value is a blob visit a jsf tool that has state saving set to server and that input field the value will not contain a huge blob via the server visit a tool with state saving set to server look in the SessionComponent -> tool MyLittleSession -> attributes look for an attribute with the key "com.sun.faces.renderkit.ServerSideStateHelper.LogicalViewMap" a tool where state saving is set to client will not have that attribute    

      Description

      SAK-29126 added the ability to programmatically add the context parameter 

      javax.faces.STATE_SAVING_METHOD

      However it was adding the parameter during Servlet initialization and not during the Servlet Context Initialization and the parameter is a context-param not a servlet init-param.

      So since this change JSF apps have been running using the default of server regardless of this configuration.

      For this to work we need need to move the logic into the Servlet Context initialization and it so happens there is one "ToolListener".

       

      Unfortunately the configuration parameters need to be adjusted as the sevlet names don't match up with the context names.

      # Chat Tool
      jsf.state_saving_method.sakai-chat-tool=server
      # Podcasts Tool
      jsf.state_saving_method.sakai-podcasts=server
      # User Preferences
      jsf.state_saving_method.sakai-user-tool-prefs=server
      # Help Tool
      jsf.state_saving_method.sakai-help=server
      # Forums
      jsf.state_saving_method.messageforums=server
      # Scheduler
      jsf.state_saving_method.sakai-scheduler=server 

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  ern Earle R Nietzel
                  Reporter:
                  ern Earle R Nietzel
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Source Code