wood burning stoves 2.0*
The moose likes JSP and the fly likes plus sign in the getParameter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "plus sign in the getParameter " Watch "plus sign in the getParameter " New topic

plus sign in the getParameter

Renato Losio
Ranch Hand

Joined: Nov 23, 2005
Posts: 99

I have a web app where the user has to confirm the registration clicking on a URL link he has in the confirmation email. Something like:


Everything runs fine but the mob value is a string that MAY start with a plus sign. And I run into problems as the String mob = request.getParameter("mob") doesn't return the plus.

Any quick fix?



Renato Losio - www.arsenio.it - renatoweb@arsenio.it
Renato Losio
Ranch Hand

Joined: Nov 23, 2005
Posts: 99
Forget about the post, I fixed it with a String mob= java.net.URLEncoder.encode(request.getParameter("mob"),"UTF-8");

Of course if you have a better idea, just add a comment :-)

Thanks anyway.

I agree. Here's the link: http://aspose.com/file-tools
subject: plus sign in the getParameter
Similar Threads
What is serialized???
Multiline Button
Java Currency Formatter
Incredibly Confused About 'Test Code'
Split a string and add the contents