• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlets

 
Deep Kulkarni
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Having a problem sending a string from one servlet to another servlet thro' href. It truncates the string if I use a space or press enter. Any solutions ??? thanx in advance.
 
srivatsan srinivasan
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

use urlencoder to pass it to query string
ex:
String str1=URLEncoder.encode("this is a test");
http://localhost/test?str=str1
 
Deep Kulkarni
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks srivatsan...
will try your suggestion
 
vikinsa
Ranch Hand
Posts: 46
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You ca use the URLencode. I am not very sure about the syntaxes here but it works really fine. Check that out. One more thing. The syntax for this has changed somewhat from jsdk2.0 to jsdk2.1.
Please keep that in mind.
Enjoy

Originally posted by Deep Kulkarni:
Having a problem sending a string from one servlet to another servlet thro' href. It truncates the string if I use a space or press enter. Any solutions ??? thanx in advance.


------------------
Vikas Aggarwal
Technology Associate
http://www.vikinsa.com
 
Johannes de Jong
tumbleweed
Bartender
Posts: 5089
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vikinsa as much as I appreciate you unselfish help, your user name does not comply with the JavaRanch's naming policy. Pse change it you wish to continue posting in our forums.
Thanks
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic