0 Replies Latest reply on Jun 29, 2006 6:51 AM by Ales Justin

    Wrong link in a portlet

    Ales Justin Master

      Using Seam and JBP 2.4.

      I have 2 portlets on my page.
      One of them is a login portlet.
      After login I display the following logout jsp in this login portlet:

      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
       Hello <h:outputText value="#{currentUser.username}"/>!
       <h:commandLink action="#{logout.logout}" value="Logout"/>
      public class LogoutAction implements Logout {
       Context sessionContext;
       public String logout() {
       sessionContext.set(USER_VAR, null);
       sessionContext.set(LOGGED_IN, null);
       return "login";

      Then I use another portlet - input some params and submiting them.

      The problem is that then my logout link is pointing to the wrong url - so the first time I hit this link it doesn't do anything. The page is rerendered, but then the logout link is the right one - clicking it really hits my LogoutAction SLSB.

      Can something similar be the cause of my wrong link?
      - http://www.onjava.com/pub/a/onjava/2004/06/09/jsf.html?page=1

      Rgds, Ales