double quotes problem in jsp while showing a string with " by <input value="<%=string%>">
Posted on 2003-03-28
I 'm using PreparedStatement to insert records. There is no single quotes or double quotes problem while inserting the record. The string is found as such in database also. While retrieving the record and showing in the browser, the string after the double quotes is not found but its there in the table.
string s=(Hello' world "welcome to jsp" );
if i bring back to screen from database thru HTML input tag
<input type="text" name="s" value="<%=s%>">
the string displayed in screen is Hello' world
"welcome to jsp" is not found.