2 Replies Latest reply on Apr 3, 2008 6:39 AM by foures adrien

    3.2.0 life cycle problem?

    foures adrien Newbie

      HI

      In my web application i use a login filter to control HttpSession and so kill the user session when exit.


       oldSession.invalidate();
       newSession = ((HttpServletRequest)request).getSession(true);
       RequestDispatcher rd = request.getRequestDispatcher("/page/timeout.jsf");
      
       rd.forward(request, response);
      



      But since update to the lastest version of richfaces 3.2.0, this filter does not work any more. I got an exception

      
      3 apr. 2008 09:32:37 com.sun.faces.lifecycle.LifecycleImpl phase
      ATTENTION: executePhase(RESTORE_VIEW 1,com.sun.faces.context.FacesContextImpl@85acc2) threw exception
      javax.faces.application.ViewExpiredException: viewId:/page/timeout.jsf - View /page/timeout.jsf could not be restored.
       at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:187)
       at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
       at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
       at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:276)
       at org.ajax4jsf.Filter.doFilter(Filter.java:175)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
       at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
       at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
       at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
       at dosmed.security.LoginFilter.redirection(LoginFilter.java:210)
       at dosmed.security.LoginFilter.doFilter(LoginFilter.java:140)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
       at java.lang.Thread.run(Thread.java:595)
      
      


      What have been changed since 3.2.0 in life cycle, and how can i resolve this problem?

      Thanks for your help

      Adrien



        • 1. Re: 3.2.0 life cycle problem?
          Ilya Shaikovsky Master

          did your mapping in web.xml looks like:

           <filter>
           <display-name>Ajax4jsf Filter</display-name>
           <filter-name>ajax4jsf</filter-name>
           <filter-class>org.ajax4jsf.Filter</filter-class>
           </filter>
           <filter-mapping>
           <filter-name>ajax4jsf</filter-name>
           <servlet-name>Faces Servlet</servlet-name>
           <dispatcher>FORWARD</dispatcher>
           <dispatcher>REQUEST</dispatcher>
           <dispatcher>INCLUDE</dispatcher>
           <dispatcher>ERROR</dispatcher>
           </filter-mapping>
          
          

          ?

          • 2. Re: 3.2.0 life cycle problem?
            foures adrien Newbie

            I added ERROR in my filter mapping of ajaxf4jsf, I have allways the same exception.

            I use tomcat6.0.13, facelet 1.1.12, richfaces 3.2.0 GA, tomahawk 1.1.7, java 1.5, jsf 1.2