Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

URLencoder.encode()

 
Deepak Mahbubani
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its generally recommended to encode the URL using java.net.URLencoder.encode() method
however, when I use it with RequestDispatcher().forward(..) to a jsp, I don't get the expected results.
The '/' characters are also encoded and the server looks for the same and throws an error.
Is this because this method is supposed to be used only when the request if send from a browser to a jsp or servlet. ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic