Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • 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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic