如何判断session是否过期

发布日期:2024-09-29 07:06:10     手机:https://m.xinb2b.cn/wenda/news793335.html    违规举报
核心提示:if(request.getSession(false)==null){System.out.println("session过期了");}如果session不存在了就表示是过期了Objectibcode=request.getSessio

如何判断session是否过期

if(request.getSession(false)==null){

System.out.println("session过期了");

}

如果session不存在了就表示是过期了

Objectibcode=request.getSession().getAttribute(ConstantFields.IB_CODE);

if(null==ibcode||"".equals(ibcode)){

System.out.println("session过期了");

}

如果session不存在了就表示是过期了

工具/原料myeclipse

 
 
本文地址:https://wenda.xinb2b.cn/news793335.html,转载请注明出处。

推荐图文
推荐问答知道
网站首页  |  关于我们  |  联系方式  |  使用协议  |  版权隐私  |  网站地图  |  违规举报  |  蜀ICP备18010318号-4  |  百度地图  | 
Processed in 0.170 second(s), 90 queries, Memory 0.46 M