• Post Reply Bookmark Topic Watch Topic
  • New Topic

URL Rewriting for HTML form's submission?

 
Anand Wadhwani
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While generating <A href="..."> in a servlet response, we can use response.encodeURL() to append session id to the URL. But what should we do for URL rewriting/encoding while submitting an html form (GET/POST) where target url is specified in form's action? Should this be done manually by appending session id in form's action url using getId() method of HttpSession ?

Please advise. Thanks!
[ April 24, 2005: Message edited by: Anand Wadhwani ]
 
Debashish Chakrabarty
Ranch Hand
Posts: 231
Firefox Browser Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A question that struck me too while ago. Yes, you should encode the URL even when doing a form submission. See below:

Hope this helps
 
Anand Wadhwani
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Debashish, that helps!
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!