javax.faces.application.ViewExpiredException: - 无法恢复视图

时间:2014-01-21 11:32:34

标签: spring jsf jsf-2 viewexpiredexception

javax.faces.application.ViewExpiredException:viewId:/login.jsf - 无法恢复查看/login.jsf。

这是我的web.xml。在IE中运行良好,但是当我在Chrome中访问它时,一旦我登录此异常就显示出来。但是,它有时会在IE中执行此操作。顺便说一句,使用Spring Security登录。所以,login.jsf是一个自定义登录页面@ Spring Security。我不确定它是否重要。

<!-- Enable Spring Security -->
<filter>
    <filter-name>springSecurityFilterChain</filter-name>
    <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>

<!-- Allow login pages with JSF which redirects to security check, therefore 
    we have to add the forward entry here -->
<filter-mapping>
    <filter-name>springSecurityFilterChain</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>

</filter-mapping>

<listener>
    <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
<listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
    <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
</listener>

<servlet>
    <servlet-name>appServlet</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <init-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/spring/servlet-context.xml</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
    <servlet-name>appServlet</servlet-name>
    <url-pattern>/spring/</url-pattern>
</servlet-mapping>

<servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
</servlet-mapping>

<context-param>
    <param-name>javax.faces.PARTIAL_STATE_SAVING</param-name>
    <param-value>false</param-value>
</context-param>

<context-param>
    <param-name>javax.faces.FULL_STATE_SAVING_VIEW_IDS</param-name>
    <param-value>/protected.xhtml,/login.xhtml</param-value>
</context-param>


<welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.xhtml</welcome-file>
    <welcome-file>index.html</welcome-file>
</welcome-file-list>

0 个答案:

没有答案