//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>
转载于:https://blog.51cto.com/just2012/1348310