Bookmark Topic Watch Topic
  • New Topic

how to pass a parameter in the query string with the '+' sign in it unchanged.

 
neha agrawal
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Report post to moderator
When a string containing a �+� is passed as a parameter in the URL in the query string through a GET request, it is interpreted as two strings separated by a �+� and thus when the string is retrieved through a request.getParameter (),it returns the string with a space in place of the �+� sign.
eg:
String dblink = "/TCE/servlet/LoginServicename="+vSystemAccount.getAccountName()+"&password="+pw;
Here the parameter pw contains a '+' sign which when retrieved by a request.getParameter() returns the parameter with a space in place of the '+' sign.How can i prevent this??
--------------------------------------------------------------------------------
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place.

And please adjust your display name as requested in your initial post.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!