servlet的encodeURL()方法
来源:互联网 发布:私募基金经理收入 知乎 编辑:程序博客网 时间:2024/06/05 12:40
encodeURL
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.
从API上看容器会自动判断是否需要把sessionID追加在URL末尾(根据 getSession()的返回值),
也就是说客户浏览器不支持Cookie的话,这个方法自动追加,实现session
- servlet的encodeURL()方法
- servlet response的encodeURL
- response.encodeURL的使用
- response.encodeURL的用法
- response.encodeURL的用法
- response.encodeURL的用法
- response.encodeURL的用法
- response.encodeURL的用法
- response.encodeURL的用法
- response.encodeURL的用法
- response.encodeURL的用法
- response.encodeURL的用法
- response.encodeURL的用法
- response.encodeURL的用法
- response.encodeURL的用法
- response.encodeURL的用法
- response.encodeURL的用法
- response.encodeURL的用法
- HDU2176 取(m堆)石子游戏
- MyEclipse 10 如何安装SVN?
- C++ Primer 学习笔记 - 第一章
- Linux下rdesktop的应用
- 基于Selenium2与Python自动化测试环境搭建
- servlet的encodeURL()方法
- 双出NAT加备份
- ios播放PCM数据
- Myeclipse 10.1 修改外部Tomcat 发布路径
- 2012.9.5
- Java多线程(二)、线程的生命周期和状态控制
- Windows远程桌面控制Linux
- Android 自定义标题栏
- struts2 ext json数据