1 Reply Latest reply on Nov 22, 2006 6:57 AM by Magesh Bojan

    location URL to redirect to after signout

    TY Newbie

      Hello,
      I need to redirect to a given location after having signed out from my jboss portal 2.4
      Apparently the UserPortlet allows to redirect to a given location as shown by the following code:

      public void userLogout(JBossActionRequest req, JBossActionResponse resp) throws IOException
       {
       String locationURL = req.getParameter("locationURL");
       if(locationURL != null)
       {
       resp.signOut(locationURL);
       }
       else
       {
       resp.signOut();
       }
       }


      The way I understand it is that if I call somthing like:
      http://localhost:8080/portal/auth/portal/default/Admin/UserPortletWindow?op=userLogout&locationURL=myUrl

      I should be redirected to myUrl? This doesn't work. Am I missing something?

        • 1. Re: location URL to redirect to after signout
          Magesh Bojan Master

          Basically that parameter has to be set in the PortletRequest and not in the HttpRequest. See menu.jsp fragment below:

          <a id="logout" href="
           <portlet:actionURL windowState="normal">
           <portlet:param name="op" value="userLogout"/>
           <portlet:param name="locationURL" value="/portal/portal/default/default"/>
           </portlet:actionURL>">
          Logout and return to default page
          </a>


          The tag portlet:actionURL does the actual work.