在我的web項目中,大部分的網頁都使用搜索範圍內管理豆。 它的工作很好,但有時,我注意到,如果我從網頁的時間一樣,10分鐘後,當我返回到頁面了,一切都在頁面停止工作,並沒有控制檯錯誤在所示服務器。 我認爲這是由於一個觀點的生活,但沒有發現任何關於它。 我在哪裏可以找到關於它的信息? 有沒有辦法配置視圖的生存時間?約觀看時長/續航時間有些問題
我使用Apache Tomcat 7 下面是我的web.xml配置文件:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="WebApp_ID" version="3.0">
<display-name>AtualyGestao</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
<welcome-file>index.jsf</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>home</param-value>
</context-param>
但沒有生命時間配置?如果想讓頁面在失去會話之前活躍更多時間,該怎麼辦? –
這只是'web.xml'中的標準Servlet API會話超時配置。另請參閱http://stackoverflow.com/questions/7449468/default-session-expiration-timeout/7449488#7449488。這更與JSF無關。 – BalusC