portletspec3
  1. portletspec3
  2. PORTLETSPEC3-4

Errata: Clarification for PortletRequest.getPortletSession()

    Details

      Description

      To be consistent with HttpServletRequest.getSession(), the Javadoc for
      PortletRequest.getPortletSession() should be changed as follows:

      Original:
      -------------------------
      PortletSession getPortletSession(boolean create)
      
          Returns the current portlet session or, if there is no current session and the 
          given flag is true, creates one and returns the new session.
      
          If the given flag is false and there is no current portlet session, this 
          method returns null.
      
          Creating a new portlet session will result in creating a new HttpSession on 
          which the portlet session is based on.
      
          Parameters:
              create - true to create a new session,
              false to return null if there is no current session 
          Returns:
              the portlet session
      -------------------------
      
      Corrected:
      -------------------------
      PortletSession getPortletSession(boolean create)
      
          Returns the current portlet session or, if there is no current session and the 
          create flag is true, creates one and returns the new session.
      
          If the given flag is false and there is no current portlet session, this method 
          returns null.
      
          Creating a new portlet session will result in creating a new HttpSession on which 
          the portlet session is based.
      
          To make sure the session is properly maintained, you must call this method before 
          the response is committed. If the container is using cookies to maintain session 
          integrity and is asked to create a new session when the response is committed, 
          an IllegalStateException is thrown.        
          
          Parameters:
              create - true to create a new session,
              false to return null if there is no current session 
          Returns:
              the portlet session
      

        Activity

        msnicklous created issue -
        msnicklous made changes -
        Field Original Value New Value
        Summary Clarification for PortletRequest.getPortletSession() Errata: Clarification for PortletRequest.getPortletSession()
        msnicklous made changes -
        Description To be consistent with HttpServletRequest.getSession(), the Javadoc for
        PortletRequest.getPortletSession() should be changed as follows:

        Original:
        -------------------------
        PortletSession getPortletSession(boolean create)

            Returns the current portlet session or, if there is no current session and the given flag is true, creates one and returns the new session.

            If the given flag is false and there is no current portlet session, this method returns null.

            Creating a new portlet session will result in creating a new HttpSession on which the portlet session is based on.

            Parameters:
                create - true to create a new session,
                false to return null if there is no current session
            Returns:
                the portlet session
        -------------------------

        Corrected:
        -------------------------
        PortletSession getPortletSession(boolean create)

            Returns the current portlet session or, if there is no current session and the given flag is true, creates one and returns the new session.

            If the given flag is false and there is no current portlet session, this method returns null.

            Creating a new portlet session will result in creating a new HttpSession on which the portlet session is based.

            To make sure the session is properly maintained, you must call this method before the response is committed.
            If the container is using cookies to maintain session integrity and is asked to create a new session when
            the response is committed, an IllegalStateException is thrown.
            
            Parameters:
                create - true to create a new session,
                false to return null if there is no current session
            Returns:
                the portlet session
        To be consistent with HttpServletRequest.getSession(), the Javadoc for
        PortletRequest.getPortletSession() should be changed as follows:

        {noformat}
        Original:
        -------------------------
        PortletSession getPortletSession(boolean create)

            Returns the current portlet session or, if there is no current session and the
            given flag is true, creates one and returns the new session.

            If the given flag is false and there is no current portlet session, this
            method returns null.

            Creating a new portlet session will result in creating a new HttpSession on
            which the portlet session is based on.

            Parameters:
                create - true to create a new session,
                false to return null if there is no current session
            Returns:
                the portlet session
        -------------------------

        Corrected:
        -------------------------
        PortletSession getPortletSession(boolean create)

            Returns the current portlet session or, if there is no current session and the
            create flag is true, creates one and returns the new session.

            If the given flag is false and there is no current portlet session, this method
            returns null.

            Creating a new portlet session will result in creating a new HttpSession on which
            the portlet session is based.

            To make sure the session is properly maintained, you must call this method before
            the response is committed. If the container is using cookies to maintain session
            integrity and is asked to create a new session when the response is committed,
            an IllegalStateException is thrown.
            
            Parameters:
                create - true to create a new session,
                false to return null if there is no current session
            Returns:
                the portlet session
        {noformat}
        msnicklous made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        msnicklous made changes -
        Assignee msnicklous [ msnicklous ]
        msnicklous made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            msnicklous
            Reporter:
            msnicklous
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: