Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

plus sign in the getParameter

 
Renato Losio
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic