5 Replies Latest reply on Jun 4, 2009 6:24 AM by nbelaevski

    Session timeout issue in safari

      Hi I'm using Richfaces 3.2.1 and tomcat 6.0.14.

      I have a sessionExpiredFilter configured in my application to redirect to login page in case of session timeout.

      However, when the session timeout occurs and the user performs any operation, it was not getting redirected to the login page instead getting hanged in the same page in IE/FF/SAFARI.

      I then used the Richfaces 3.3.1, it resolved the problem in IE/FF (i.e. it was getting redirected to the login page). But the problem still exists with Safari.

      Can anyone suggest some solution.

        • 1. Re: Session timeout issue in safari

          The problem is happening only with ajax components.

          i.e, for the following code the page is not redirected to the login page

          <h:form>
          <a4j:commandButton action="#{baseMgdBean.fetchData}"/>
          </h:form>


          However for the following code the page is redirected to the login page

          <h:form>
          <h:commandButton action="#{baseMgdBean.fetchData}"/>
          </h:form>

          • 2. Re: Session timeout issue in safari
            ilya_shaikovsky

            show your web.xml

            • 3. Re: Session timeout issue in safari
              nbelaevski

              Filter should be called AFTER RF filter.

              • 4. Re: Session timeout issue in safari

                web.xml:

                <?xml version="1.0"?>
                <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">


                <listener-class>
                com.cfg.ctl.LogConfigureAndWatch
                </listener-class>


                <context-param>
                <param-name>org.ajax4jsf.SKIN</param-name>
                <param-value>blueSky</param-value>
                </context-param>
                <context-param>
                <param-name>com.exadel.vcp.SKIN</param-name>
                <param-value>blueSky</param-value>
                </context-param>
                <context-param>
                <param-name>javax.faces.CONFIG_FILES</param-name>
                <param-value>/WEB-INF/navigation.xml</param-value>
                </context-param>
                <context-param>
                <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                <param-value>server</param-value>
                </context-param>
                <context-param>
                <param-name>facelets.DEVELOPMENT</param-name>
                <param-value>false</param-value>
                </context-param>
                <context-param>
                <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
                <param-value>.xhtml</param-value>
                </context-param>
                <context-param>
                <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
                <param-value>com.sun.facelets.FaceletViewHandler</param-value>
                </context-param>
                <context-param>
                <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
                <param-value>false</param-value>
                </context-param>
                <context-param>
                <param-name>org.ajax4jsf.xmlparser.ORDER</param-name>
                <param-value>NEKO</param-value>
                </context-param>
                <context-param>
                <param-name>onload-config</param-name>
                <param-value>/WEB-INF/onload-config.xml</param-value>
                </context-param>


                <display-name>Ajax4jsf Filter</display-name>
                <filter-name>ajax4jsf</filter-name>
                <filter-class>org.ajax4jsf.Filter</filter-class>

                <filter-mapping>
                <filter-name>ajax4jsf</filter-name>
                <servlet-name>Faces Servlet</servlet-name>
                FORWARD
                REQUEST
                INCLUDE
                ERROR
                </filter-mapping>


                <filter-name>sessionExpiredFilter</filter-name>
                <filter-class>com.cfg.ctl.SessionTimeOutFilter</filter-class>


                <filter-mapping>
                <filter-name>sessionExpiredFilter</filter-name>
                <url-pattern>*.faces</url-pattern>
                </filter-mapping>


                <servlet-name>Faces Servlet</servlet-name>
                <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>



                <!-- Faces Servlet Mapping -->
                <servlet-mapping>
                <servlet-name>Faces Servlet</servlet-name>
                <url-pattern>*.faces</url-pattern>
                </servlet-mapping>



                <session-config>
                <session-timeout>1</session-timeout>
                </session-config>


                <welcome-file-list>
                <welcome-file>index1.jsp</welcome-file>
                </welcome-file-list>

                </web-app>

                • 5. Re: Session timeout issue in safari
                  nbelaevski

                  Yes, for your web.xml, session expiration filter is called BEFORE RF filter, but should be called AFTER