I have the URL with the following query string
equipmentAccessoryRoute=LFVR+BASICACC
When I do request.getParameter("equipmentAccessoryRoute")
it returns 'LFVR BASICACC' in a string variable, replacing plus sign with space.
To resolve this issue I did something like this
String accessoryRoute = java.net.URLEncoder.encode(request.getParameter("equipmentAccessoryRoute"),"UTF-8");
It worked perfectly but now yt is not working for the following query string (which was working before)
`equipmentAccessoryRoute=C1000IP5EL@-A`
Decoding converts this into 'C1000IP5EL%40-A' and stores into a string.
I am really confused. I tried to learn URL encoding but find it very hard to understand.