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
Author

plus sign in the getParameter

Renato Losio
Ranch Hand

Joined: Nov 23, 2005
Posts: 99
Hello.

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:

http://myapplication.com/confirm_user?mob=89458454545

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?

Thanks,

Renato


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.

Renato
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: plus sign in the getParameter