• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference b/w response.encodeURL() and response.encodeRedirectURL()

 
Ceenu Reddy
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Folks,

We use response.encodeURL() and response.encodeRedirectURL() methods are used for URL rewriting, if the cookies disabled in the browswer or not supported.

Can anybody explain what is the difference b/w above two methods exactly?


Thanks in advance...
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The API can.

encodeRedirectURL

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 the encodeURL method.


http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletResponse.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic