//index.jsp
<body> <% session.setAttribute("str", "COOKIE"); String url = new String("third.jsp"); url = response.encodeUrl(url); %> <a href = "<%= url %>"> 显示</a> </body>
//third.jsp
<body> <%= session.getAttribute("str") %> </body>
//index.jsp
<body> <% session.setAttribute("str", "COOKIE"); String url = new String("third.jsp"); url = response.encodeUrl(url); %> <a href = "<%= url %>"> 显示</a> </body>
//third.jsp
<body> <%= session.getAttribute("str") %> </body>
上一篇:java cookie
下一篇:Java 过滤器
ingress
居然有3W的访问量,好,我就把session和cookie的关系先来个总结,注意,是最最简单直白明了
Cookie禁用使用Session值方法
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M