0 Replies Latest reply on Feb 16, 2012 1:00 AM by selfcare

    Phase listener not calling after logging out




      Am using JSF 1.2 , Jboss AS 5.1.0 , Liferay Portal 6.0


      When I login, my Phaselistener gets called and I will land on Home page. My beans are in Request scope for Home Page except for one bean which is in Session Scope.


      The bean which is in Session scope contains a link in it which redirects to a different page from Home page. If that is also made Request scope, redirection doesnt happen to another page and it stays in the same page.


      Now if I logout and login again, Home page is not displayed. May be the session scope which is there for one of the beans in Home Page is getting applied and its thinking that its in same session and so my Phaselistener is not getting called after I logout and login again.



      My faces-config.xml contents are below,


















      My phaselistener code is as below,





      public class CustomPhaseListener

        implements PhaseListener, Serializable


        private static final long serialVersionUID = 1L;

        private Logger log = Logger.getLogger(CustomPhaseListener.class);


        public PhaseId getPhaseId()


          this.log.info("Entered into getPhaseId");

          return PhaseId.RENDER_RESPONSE;



        public void beforePhase(PhaseEvent e)


          this.log.info("Entered into beforePhase");

          FacesContext context = null;



            context = e.getFacesContext();

            HomePageBean bean = (HomePageBean)context.getApplication().getVariableResolver().resolveVariable(context, "homePageBean");

            PPVBean ppvbean = (PPVBean)context.getApplication().getVariableResolver().resolveVariable(context, "ppvBean");






          catch (Exception e1) {






      After I logout am destroying the session created.


      But still after I logout and login again Phase listener is not getting called..


      How to resolve this?