Posted By:
Troy_Niven
Posted On:
Sunday, March 25, 2001 12:29 PM
Use the
java.net.URLEncoder.encode()
method
just
import java.net.URLEncoder;
then use the method on the String you want encoded.
String temp1 = request.getParameter("something");
temp1=URLEncoder.encode(temp1);
The temp1 string will have it's spaces replaced with %20.
Please note that all other special characters will be URLEncoded as well.
LOGAN