cookies被禁用如何获取session

来源:百度知道 编辑:UC知道 时间:2024/05/24 10:39:16
这样对吗:

response.encodeURL("http://www.laozizhu.com"); response.encodeRedirectURL("http://www.laozizhu.com")

response.encodeURL("http://www.laozizhu.com");
这句话就已经重写了url了 这样客户端就已经和当前用户取得了连接了
不需要再写response.encodeRedirectURL("http://www.laozizhu.com")

正因为考虑到如果cookies被禁用等原因,jsp才使用session

Session是存储在你服务器端的.用户禁用不了,直接request.getSession.getAttribute("")就可以拿到

cookies可session有关吗?