• Post Reply Bookmark Topic Watch Topic
  • New Topic

Servelt input paramter problem is value contains '+'

 
kmk comeng
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am sending parameter to servlet using below link

http://localhost:8084/TestWeb/TestServlet?text=k+k

In servlet, I am getting value of "text" parameter as "k k".

but i want "k+k".
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65519
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Values in a URL must be properly URL-encoded.
 
mahesh shinde
Ranch Hand
Posts: 69
Eclipse IDE Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Must encode url for special character
your URL k%2Bk instead of k+k

Here is very good tutorial
Encode urls
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!