0

getQueryString()

gives

cid=1&params=zDmrLGXJ1DboOuqBn2062Z%2BQmQ4w7ODNGAfZL4L8rpk%3D.

and

getParameter(PARAM_NAME)

gives

zDmrLGXJ1DboOuqBn2062Z+QmQ4w7ODNGAfZL4L8rpk=

What happened with %3D. ?

I used URLEncoder.encode(url, "UTF-8") to create params.

Damian
  • 2,930
  • 6
  • 39
  • 61
  • 2
    http://www.degraeve.com/reference/urlencoding.php – kosa Jul 04 '13 at 15:48
  • I get It. I have string that can contain & and = . What method can I use to encode it and decode before I put it in URL .The string is a message encrypted with AES. – Damian Jul 04 '13 at 15:51
  • see this may help http://stackoverflow.com/questions/3278900/httpservletrequest-setcharacterencoding-seems-to-do-nothing – kosa Jul 04 '13 at 15:52

2 Answers2

3

%3D is the equal (=) sign you have at the end of the parameter string. It's the same with %2B which was replaced by its decoded value: plus (+) sign.

Ruan Mendes
  • 90,375
  • 31
  • 153
  • 217
eternay
  • 3,754
  • 2
  • 29
  • 27
1

The URLEncoder coverts any special characters (@,=,+,etc.) so that it can be used as a url. getParameter() coverts the string back to what it was originally while getQueryString() returns the raw querystring.

Brad
  • 21
  • 3