http://tomcat.apache.org/tomcat-5.5-doc/servletapi/javax/servlet/http/HttpServletResponse.html#encodeRedirectURL(java.lang.String)
public java.lang.String encodeRedirectURL(java.lang.String url)
Encodes the specified URL for use in the
sendRedirect
method 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. Because the rules for making this determination can differ from those used to decide whether to encode a normal link,this method is separated from theencodeURL
method.All URLs sent to the
HttpServletResponse.sendRedirect
method 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.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。