Keeping user from putting quotes around string in JSP???

I have a JSP where the user is asked to input a string that will be put into a table in my database. I do not have problems adding the string but if I were to try and edit or copy that same string I get the problem of having ""HELLO"" instead of "HELLO". If "HELLO" were to be an example of a string that I entered. How could I ensure that the user was never able to add the quotes to a string in my JSP??? Please help, this is quite urgent!!! Thank you.

You can just use JSP scriptlet to check for and remove the quotes, if they are present.

Bosun

Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley

Vlad Patryshev
Ranch Hand

Joined: Jun 30, 2001
Posts: 61

posted Aug 08, 2001 14:24:00

0

Oh I see. You want to do it on the client side. Then you can do it using Javascript of course. Not by reacting to key presses (here Javascript is not as strong as one might need), but just by stripping the quotes, say, after the user changes focus.