• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

regarding request.getParameter() function

 
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic