1 2 Previous Next 19 Replies Latest reply on Mar 11, 2005 11:17 AM by julien1

    not able to get request.getPortletSession().invalidate() wor

      Hi all

      I'm trying to write my own custom login portlet.
      The problem is that request.getPortletSession().invalidate(); does not seems to work when a user logs out.

      Here is the code:
      public void processAction(ActionRequest request, ActionResponse response) throws PortletException, PortletSecurityException, IOException
      {
      if (request.getParameter("op").equals("logout"))
      {
      request.getPortletSession().invalidate();
      String home = PORTAL_HOME;
      response.sendRedirect(home);
      }
      }

      request.getRemoteUser is not null after a call to request.getPortletSession().invalidate();
      I'm logging in to JBoss Portal Realm with , in the login form.

      If I log in via my custom login portlet, and logs out via default Jboss User portlet everyting works as expected.
      When the session times out everyting works as expected.

      I have debugged the process via remote debugger, and a call to request.getPortletSession().invalidate(); in my custom login portlet ends up in org.jboss.portal.portlet.impl.PortletSessionImpl.invalidate(), so the underlying HTTP session seems to be invalidated and the portletSession is marked as invalid. (Exactly the same happens when I log out via JBoss User portlet)
      But the portletSession still lives on..

      Any ideas?

      regards
      Jan Ole

        1 2 Previous Next