dcsimg
URLEncoder class encodes equal signs in query string
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Raj_Ashar
Posted On:   Thursday, February 5, 2004 02:22 PM

Hi. I've found that the URLEncoder class encodes the equal signs in the query portion of a URL. Calling returnString = URLEncoder.encode(returnString, HTMLParameters.Encoding); results in https://localhost/ncr/SCR/EditSCR.jsp?SCRID%3D425 rather than a URL with a properly formatted query string: https://localhost/ncr/SCR/EditSCR.jsp?SCRID=425 Since the values of the parameters that we pass shall contain unsafe values, we need to encode the parameter values. However, encoding the values themselves piecewise seems kludgy. Does there exist a simple way to encode the values of the query string without encoding the equal signs? Thank you.    More>>

Hi. I've found that the URLEncoder class encodes the equal signs in the query portion of a URL. Calling

			
returnString = URLEncoder.encode(returnString, HTMLParameters.Encoding);


results in

https://localhost/ncr/SCR/EditSCR.jsp?SCRID%3D425


rather than a URL with a properly formatted query string:

https://localhost/ncr/SCR/EditSCR.jsp?SCRID=425


Since the values of the parameters that we pass shall contain unsafe values, we need to encode the parameter values. However, encoding the values themselves piecewise seems kludgy. Does there exist a simple way to encode the values of the query string without encoding the equal signs?

Thank you.

Raj    <<Less
About | Sitemap | Contact