2 Replies Latest reply on Jan 17, 2007 12:35 AM by thanvi

    Singout

    thanvi

      Hi,

      I need to invoke an portlet which is in a different war, when the user clicks on the logout link in the user portlet.

      I tried the following code to logout from the Portlet by doing a sendRedirect after the signout happens as below

      String locationURL = req.getParameter("locationURL");
       if(locationURL != null){
       resp.signOut(locationURL);
       } else {
       resp.signOut();
       }
       PortalNode thisNode2 = req.getPortalNode().getParent();
       PortalNode linkToNode2 = thisNode2.resolve("../TestPortlet");
       PortalNodeURL pageURL2 = resp.createRenderURL(linkToNode2);
       resp.sendRedirect(pageURL2+"/TestPortletWindow?action=2");


      This works fine, but after signout points to the TestPortlet page.


      So I moved the code before signout as below.
      But now the request is not going to the TestPortlet, instead only the signout in the portal happens

      String locationURL = req.getParameter("locationURL");
       PortalNode thisNode2 = req.getPortalNode().getParent();
       PortalNode linkToNode2 = thisNode2.resolve("../TestPortlet");
       PortalNodeURL pageURL2 = resp.createRenderURL(linkToNode2);
       resp.sendRedirect(pageURL2+"/TestPortletWindow?action=2");
       if(locationURL != null){
       resp.signOut(locationURL);
       } else {
       resp.signOut();
       }

      Can anyone let me know why this happens and how to resolve.
      Also i am not getting the Window url when i do a createRenderURL


      Please Help

        • 1. Re: Singout
          scottdawson

          At the bottom of portal-core.war/WEB-INF/jsp/user/menu.jsp, there is a chunk of commented-out HTML that can be uncommented to provide a "Logout and return to default page" link in the User Portlet. The target URL is configurable. Can you use that to solve your problem?

          Regards,
          Scott Dawson
          Unisys

          • 2. Re: Singout
            thanvi

            In the first option if i try to set the LocationURL its of no use since the request to another portlet happens later.


            In the second option it works fine but the request in not getting redirect to the other portlet i.e TestPortlet.

            Issue is why is it the TestPortlet not getting invoked in the second option