0
在一个servlet页面中,我设置了一个会话。我的会话将持续多久
住多少时间?
if(session.getAttribute!=null){
while(rs.next())
name=rs.getString("name");
addres=rs.getString("address");
}
谢谢
在一个servlet页面中,我设置了一个会话。我的会话将持续多久
住多少时间?
if(session.getAttribute!=null){
while(rs.next())
name=rs.getString("name");
addres=rs.getString("address");
}
谢谢
基本上会话存活,只要用户不关闭他/她的浏览器,或达到会话超时(默认:30分钟)。您可以在部署描述符或代码中使用session.setMaxInactiveInterval(3600);
一个会议的目的是保持对每个请求之间的服务器端信息定义使用
<session-config>
<session-timeout>60</session-timeout>
</session-config>
的最大超时。也许你也想看看会话跟踪..看看这里: Session or cookie confusion