//获取Session对象
request.getSession()
request.getSession(boolean create)
//获取SessionId
getId()
//获取当前session对象的创建时间
getCreationTime()
//获取最后一次访问该session对象的时间
getLastAccessedTime()
//设置Session最大时效
setMaxInactiveInterval()
//获取Session最大时效
getMaxInactiveInterval()
//判断当前Session对象是不是新建的
/**
如果客户端请求消息中返回了一个与Servlet程序当前获得的HttpSession对象的会话标识号相同的会话标识号,则认为这个HttpSession对象不是新建的。
*/
isNew()
//销毁当前Session对象
invalidate()
//属性相关
setAttribute()
getAttribute()
removeAttribute()
getAttributeNames()

 

相关文章:

  • 2021-12-09
  • 2021-06-29
  • 2021-07-04
  • 2021-07-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-18
  • 2021-05-16
  • 2021-11-24
  • 2021-11-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案