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

        Hide
        mfreedma added a comment -

        Looks good.

        Show
        mfreedma added a comment - Looks good.
        Hide
        msnicklous added a comment -

        updated formatting.

        Show
        msnicklous added a comment - updated formatting.
        Hide
        msnicklous added a comment -

        Updated javadoc comments.

        Show
        msnicklous added a comment - Updated javadoc comments.
        Hide
        msnicklous added a comment -

        Fix discussed on 20130723 and was accepted.

        Show
        msnicklous added a comment - Fix discussed on 20130723 and was accepted.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: