Forums Register Login

special Characters #, + etc. in popup window

+Pie Number of slices to send: Send
Hi,
I am appending string values to the action and calling a popup from a jsp.
url = 'ColPreviewAction.do?'+strValues;

In my action class I call
queryStr = URLDecoder.decode(request.getQueryString(), "UTF-8");

If there are special characters in the query string, I am not getting any characters after the special character in my query string.

ex: if strValues = sk#sbc
when I decode I am getting only upto sk in the query string.

Could anyone please tell me how to handle special characters like # using popup window.

Thanks,
Swapna.
+Pie Number of slices to send: Send
Look at URLEncoder

Just make sure not to encode the actual control characters that define your querystring.
+Pie Number of slices to send: Send
Why are you trying to decode the query string yourself in the first place?
Doody calls. I would really rather that it didn't. Comfort me wise and sterile tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1919 times.
Similar Threads
problem with window.ShowModelDialog()
UrlEncode the String
Unicode URLs
Using Struts 2 Select Tag for dynamic values
URL Encoding at client side
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 08:07:29.