cookie是存储是客户端上
session存储在服务器端内存上你通过禁止cookie,只能是cookie不能用结论:那本书在胡编。
session存储在服务器端内存上你通过禁止cookie,只能是cookie不能用结论:那本书在胡编。
解决方案 »
- 怎样查看Tomcat当前获得的和使用的内存大小是多少?
- tomcat6连接池配置问题
- 刚看hibernate的书!不知道怎么在JCreator 中运行它的程序!也不知道怎么配制它!哪位大牛来帮帮我撒!先谢谢拉!
- org.me.hello
- 用jasperreport做报表时,如何将形成的pdf文件另存?
- 谁能在一个TOMCAT下同时给2种数据库配连接池?
- private Log log = LogFactory.getFactory().getInstance(this.getClass().getName());这个Log日志写到哪个文件里?
- (200分)用java程序如何实现通过条形码的值产生条形码呢?(在线等待!) (itfuture )
- 如何记jsp对数据库的查询像google那样归页
- 关于JSP汉字显示的问题
- 一个简单问题:调用javascript 函数判断文本框不能为空?
- 请问:高手如何在jsp前台页面调用已经写好的存储过程,视图等,可否给示例代码或者关于这方面的资料参考,谢谢!!
cooky里面存了一个session id,如果禁用了cooky的话,那么这个session id就可能找不到了.并不是session失效了.
encodeURL方法就包含了session id.
public java.lang.String encodeURL(java.lang.String url)Encodes the specified URL by including the session ID in it, or, if encoding is not needed, returns the URL unchanged. The implementation of this method includes the logic to determine whether the session ID needs to be encoded in the URL. For example, if the browser supports cookies, or session tracking is turned off, URL encoding is unnecessary.
For robust session tracking, all URLs emitted by a servlet should be run through this method. Otherwise, URL rewriting cannot be used with browsers which do not support cookies.Parameters:
url - the url to be encoded.
Returns:
the encoded URL if encoding is needed; the unchanged URL otherwise.
Set-Cookie: JSESSIONID=AE4E6285A0FBCAAF9B50E658711496E9; Path=/
这个session id的话,无论我的ie是否禁用了cookie,这个编号每次都会出现在
ie请求的http报文里面
Cookie: JSESSIONID=1F229EF22A06B0446D4018240509654C通过上面的测试分析,我真的有点怀疑书上面写的,如果禁用了cookie真的就能够
使session失效,我现在真的有点不相信了!祝你好运!
限制session id 的保存,通过测试分析后得出了下面的结论:
ie 6.0(以前的版本没有测试过)虽然限制了cookie但是不能限制session id 在cookie的保存。也就是说通过限制ie 的cookie的方式,无法限制session.祝你好运!