aspose file tools*
The moose likes Servlets and the fly likes servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlets" Watch "servlets" New topic
Author

servlets

Deep Kulkarni
Greenhorn

Joined: Jun 13, 2001
Posts: 2
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

Joined: Jun 08, 2001
Posts: 26

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

Joined: Jun 13, 2001
Posts: 2
thanks srivatsan...
will try your suggestion
vikinsa
Ranch Hand

Joined: Apr 18, 2001
Posts: 46
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


Vikas Aggarwal<BR>Technology Associate<BR>http://www.vikinsa.com
Johannes de Jong
tumbleweed
Bartender

Joined: Jan 27, 2001
Posts: 5089
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: servlets
 
Similar Threads
passing parameter to a servlet
Basic question
Accessing Servlet methods
my servlet says its unavailable in IE
Servlet call using Hyperlink