Link to home
Start Free TrialLog in
Avatar of tekege
tekege

asked on

HTTPServletRequest truncates ajax request value "contact #12345" from '#' character.

I have to save user input.

<textarea class='darkGrayText' name='dialTip' id='dialTip' rows='5' cols='40'>

If user writes "Contact # 1234567890" then on the server side when I try to get "dialTip" as

String dialTip = request.getParameter("dialTip");

I only get the string "Contact" ie. the input string get truncated as soon as the '#' char. appears.
ASKER CERTIFIED SOLUTION
Avatar of Devario Johnson
Devario Johnson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mukundha_expert
mukundha_expert

use %23 instead of a # when you  send therequest,
you can do this using a Javascript, replace the occurence of '#' with %23 in the request params