This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between encodeURL and encodeRedirectURL

 
Malli Raman
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I want to know the difference between the encodeURL and encodeRedirectURL. I have found some related topics in the Java ranch, but i am not able to pinpoint the reason. Can anyone help me?
Thanks & Regards,
M.S.Raman
 
Arun Boraiah
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When redirecting to a page using sendRedirect use encodeRedirectURL, that is you are passing yoursession to the new request.
encodeURL can be used while include or forward to a page, where you need to pass the session info.
JSESSIONID gets appended in the url when cookies are disabled.
 
Malli Raman
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Arun Boraiah:
When redirecting to a page using sendRedirect use encodeRedirectURL, that is you are passing yoursession to the new request.
encodeURL can be used while include or forward to a page, where you need to pass the session info.
JSESSIONID gets appended in the url when cookies are disabled.

Thanks for your prompt reply. I need some clarification.
If we are redirecting the request to some other page, why we need to pass the session information to that page?
Regards,
M.S.Raman
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic