• Post Reply Bookmark Topic Watch Topic
  • New Topic

regarding request.getParameter() function

 
gaurav singhal
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using this method to used the value passed by get method in form

But if the string contain '+' sign this method substitute it with a space
Is there anyway to avoid this?? eg i have id=gau+rav but when I read it as String sid=request.getParameter("id");

The output to sid is gau rav.

I have solve this problem by string tokenisation and reframing it but my application is still crashing when there is a + in the end where string tokenisation will not help.

Gaurav
[ April 26, 2006: Message edited by: Bear Bibeault ]
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to RFC 2396. a space must be encoded in a URL string as a '+':
So when reading it back, you'll get a space.

You could use JSTL to convert the parameters:


[ April 26, 2006: Message edited by: Satou kurinosuke ]
 
Sunesh Kumar
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Gaurov,

As Bear mentions evry time time this forum members helps the programmers like us when the members are free dont try to force them by using the word "urgent".

You have to post a questions after reading all the faqs here for a similar question and after browsing over the web. simple posting here may not help you.

Common, dont take this in the other way please try to understand others also thats what i want to say...

bye
 
gaurav singhal
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks and sunesh its is unintentional to actually force the member of this forum to reply. I apologise if it disturbed any member of this forum.

Gaurav
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!