AF
Home
Tag
Submit Notes
Ask Anything
Login
Subscribe Us
A
ny
F
orum
1. Feel Free to ask and submit anything on Anyforum.in and get satisfactory answer
2. Registration is not compulsory, you can directly login via google or facebook
3. Our Experts are looking for yours ?.
Follow @anyforumin
java-servlet: What is the difference between encodeRedirectUrl and encodeURL?
Please explain the difference between encodeRedirectUrl and encodeURL.
java x 211
servlet x 20
Posted On :
2014-06-07 00:44:19.0
Garima Gupta
596
1295
60202
4
Answers
HttpServletResponse provides method to encode URL in HTML hyperlinks so that the special characters and white spaces can be escaped and append session id to the URL. It behaves similar to URLEncoder encode method with additional process to append jsessionid parameter at the end of the URL.
However HttpServletResponse encodeRedirectUrl() method is used specially for encode the redirect URL in response.
So when we are providing URL rewriting support, for hyperlinks in HTML response, we should use encodeURL() method whereas for redirect URL we should use encodeRedirectUrl() method.
Posted On :
2014-06-07 00:59:15
Satisfied :
1 Yes
0 No
Rishi Kumar
523
1882
50045
Reply This Thread
5
Post Answer
Please Login First to Post Answer:
Login
Answer:
anyforum.in