• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Difference between encodeURL and encodeRedirectURL

 
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic