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.
Java EEWeb Development

Avatar of undefined
Last Comment

8/22/2022 - Mon
Devario Johnson

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

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
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck