求大神解决,我希望在没登录的状态下访问任何URL都直接跳转到登录首页 之后怎么才能在点击退出之后清空数据 我现在退出了清空session 但是点击网页的后退还是能返回到我退出之前的状态
19 回复
能收到请求 因为页面都已经跳转了 后台代码我写的是:
//退出系统
@At("/tuichuxitong")
public void tuichuxitong(HttpSession session,HttpServletResponse response) throws IOException{
System.err.println("进入结束方法===================");
session.invalidate();
response.sendRedirect("index");
}
127.0.0.1 - - [20/Jul/2017:09:52:12 +0800] "GET / HTTP/1.1" 200 11452
0:0:0:0:0:0:0:1 - - [20/Jul/2017:09:53:22 +0800] "GET /wg/eq/index HTTP/1.1" 302 -
0:0:0:0:0:0:0:1 - - [20/Jul/2017:09:53:23 +0800] "GET /wg/eq/codesss HTTP/1.1" 200 6216
0:0:0:0:0:0:0:1 - - [20/Jul/2017:09:53:23 +0800] "GET /wg/css/reset.css HTTP/1.1" 304 -
127.0.0.1 - - [20/Jul/2017:09:55:43 +0800] "GET / HTTP/1.1" 200 11452
0:0:0:0:0:0:0:1 - - [20/Jul/2017:09:55:55 +0800] "GET /wg/eq/index HTTP/1.1" 302 -
0:0:0:0:0:0:0:1 - - [20/Jul/2017:09:55:55 +0800] "GET /wg/eq/codesss HTTP/1.1" 302 -
0:0:0:0:0:0:0:1 - - [20/Jul/2017:09:55:55 +0800] "GET /wg/eq/index HTTP/1.1" 302 -
0:0:0:0:0:0:0:1 - - [20/Jul/2017:09:55:55 +0800] "GET /wg/eq/codesss HTTP/1.1" 302 -
0:0:0:0:0:0:0:1 - - [20/Jul/2017:09:55:55 +0800] "GET /wg/eq/index HTTP/1.1" 302 -
0:0:0:0:0:0:0:1 - - [20/Jul/2017:09:55:55 +0800] "GET /wg/eq/codesss HTTP/1.1" 302 -
0:0:0:0:0:0:0:1 - - [20/Jul/2017:09:55:55 +0800] "GET /wg/eq/index HTTP/1.1" 302 -
0:0:0:0:0:0:0:1 - - [20/Jul/2017:09:55:55 +0800] "GET /wg/eq/codesss HTTP/1.1" 302 -
0:0:0:0:0:0:0:1 - - [20/Jul/2017:09:55:55 +0800] "GET /wg/eq/index HTTP/1.1" 302 -
0:0:0:0:0:0:0:1 - - [20/Jul/2017:09:55:55 +0800] "GET /wg/eq/codesss HTTP/1.1" 200 6216
0:0:0:0:0:0:0:1 - - [20/Jul/2017:09:59:12 +0800] "GET /wg/eq/codesss HTTP/1.1" 302 -
0:0:0:0:0:0:0:1 - - [20/Jul/2017:09:59:12 +0800] "GET /wg/eq/index HTTP/1.1" 302 -
0:0:0:0:0:0:0:1 - - [20/Jul/2017:09:59:12 +0800] "GET /wg/eq/codesss HTTP/1.1" 302 -
0:0:0:0:0:0:0:1 - - [20/Jul/2017:09:59:12 +0800] "GET /wg/eq/index HTTP/1.1" 302 -
0:0:0:0:0:0:0:1 - - [20/Jul/2017:09:59:12 +0800] "GET /wg/eq/codesss HTTP/1.1" 200 6216
0:0:0:0:0:0:0:1 - - [20/Jul/2017:10:00:28 +0800] "GET /wg/eq/adminlogin HTTP/1.1" 200 869
0:0:0:0:0:0:0:1 - - [20/Jul/2017:10:00:28 +0800] "GET /wg/css/styles.css HTTP/1.1" 304 -
0:0:0:0:0:0:0:1 - - [20/Jul/2017:10:00:28 +0800] "GET /wg/images/eq/qingcai.png HTTP/1.1" 304 -
0:0:0:0:0:0:0:1 - - [20/Jul/2017:10:00:31 +0800] "POST /wg/eq/adlogin HTTP/1.1" 302 -
0:0:0:0:0:0:0:1 - - [20/Jul/2017:10:00:31 +0800] "GET /wg/eq/admin1 HTTP/1.1" 200 770
0:0:0:0:0:0:0:1 - - [20/Jul/2017:10:00:31 +0800] "GET /wg/css/styleadd.css HTTP/1.1" 304 -
0:0:0:0:0:0:0:1 - - [20/Jul/2017:10:00:40 +0800] "GET /wg/eq/tuichuxitong HTTP/1.1" 302 - //这是点击退出系统
0:0:0:0:0:0:0:1 - - [20/Jul/2017:10:00:40 +0800] "GET /wg/eq/index HTTP/1.1" 302 -
0:0:0:0:0:0:0:1 - - [20/Jul/2017:10:00:40 +0800] "GET /wg/eq/codesss HTTP/1.1" 302 -
0:0:0:0:0:0:0:1 - - [20/Jul/2017:10:00:40 +0800] "GET /wg/eq/index HTTP/1.1" 302 -
0:0:0:0:0:0:0:1 - - [20/Jul/2017:10:00:40 +0800] "GET /wg/eq/codesss HTTP/1.1" 302 -
0:0:0:0:0:0:0:1 - - [20/Jul/2017:10:00:40 +0800] "GET /wg/eq/index HTTP/1.1" 302 -
0:0:0:0:0:0:0:1 - - [20/Jul/2017:10:00:40 +0800] "GET /wg/eq/codesss HTTP/1.1" 200 6216
0:0:0:0:0:0:0:1 - - [20/Jul/2017:10:01:42 +0800] "GET /wg/eq/codesss HTTP/1.1" 302 -
0:0:0:0:0:0:0:1 - - [20/Jul/2017:10:01:42 +0800] "GET /wg/eq/index HTTP/1.1" 302 -
0:0:0:0:0:0:0:1 - - [20/Jul/2017:10:01:42 +0800] "GET /wg/eq/codesss HTTP/1.1" 302 -
0:0:0:0:0:0:0:1 - - [20/Jul/2017:10:01:42 +0800] "GET /wg/eq/index HTTP/1.1" 302 -
0:0:0:0:0:0:0:1 - - [20/Jul/2017:10:01:42 +0800] "GET /wg/eq/codesss HTTP/1.1" 200 6216
添加回复
请先登陆