• 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

encodeURL & encodeRedirectURL

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Ranches,
How can tell me what the difference is between encodeURL and encodeRedirectURL? Are they both used for URL Rewriting?
Many thanks
Eunis
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think there was a previous debate on this topic, forgot what it resolved to. But anyways, yes both these methods are used to encode URL's.
encodeRedirectURL is used specifically to encode for the sendRedirect(...) method.
The difference is in deciding whether to encode the sessionID into the URL or not.
- satya
 
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Madhav Lakkapragada:
The difference is in deciding whether to encode the sessionID into the URL or not.


Both methods will add jsessionid to the URL where necessary, however (according to the API) the logic for working out whether it is necessary, is different for sendRedirect, hence two methods.
Any idea why the logic should be different? Tomcat's implementation appears to use the same logic for both cases.
[ March 22, 2002: Message edited by: Tim Duncan ]
 
Eunis Huang
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot. I got it
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic