如何判斷session超時
阿新 • • 發佈:2019-02-13
<filter> <filter-name>Session Timeout Filter</filter-name> <filter-class>com.vstsoft.common.filter.SessionTimeoutFilter</filter-class> <init-param> <param-name>redirectURL</param-name> <param-value>/loginOut.jsp</param-value> </init-param> <init-param> <param-name>exceptFiles</param-name> <param-value> /#/login.jsp#/loginOut.jsp </param-value> </init-param> <init-param> <param-name>enable</param-name> <param-value>true</param-value> </init-param> </filter> <filter-mapping> <filter-name>Session Timeout Filter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <session-config> <session-timeout>30</session-timeout> </session-config>
把這段放到web.xml中就可以了
詳細內容檢視Session Timeout Filter