Session的生命周期的設(shè)置
第一種:在web.xml
加入
<session-config>
<session-timeout>15</session-timeout>
</session-config>
第二種針對(duì)專門(mén)的一個(gè)session設(shè)計(jì)
session.setMaxInactiveInterval(XXX)
在web.xml中的<servlet>加入
<load-on-startup>1</load-on-startup>
可以使servlet在容器啟動(dòng)時(shí)得到加載,而不用等到第一個(gè)request的到達(dá)
posted on 2007-11-09 11:47 劉錚 閱讀(1433) 評(píng)論(4) 編輯 收藏 所屬分類: JSP and Servlet