标签:att url date code str gets response attr bsp
=================================session
String name = request.getParameter("name‘);
HttpSession session = request.getsession();
session.setAttribute("sessionKey",name);
session.setAttribuet("sessionKey");
session.removeAttribute("key");
session.invalidate();//删除所有session中保存的键
===================================cookie
String name = request.getParameter("name");
name = java.net.URLEncoder.encode("name","UTF-8");
Cookie cookie = new Cookie("cookieKey",name);
cookie.setMaxAge(60);//六十秒
response.addCookie(cookie);
?????循环遍历取cookie时候,
标签:att url date code str gets response attr bsp
原文地址:http://www.cnblogs.com/21heshang/p/6135693.html