Im using prepared statement to store data in database on a
JSP (data is entered in a textbox). Im retrieving the data using <bean:write name='SomeForm' property='SomeProperty'/> on the same JSP to compare the values in the database and the textbox so that if someone is changing the data in textbox, and not saving it, and navigating away from the page, it should give an alert msg.
To compare, im using the following code:
The problem is, if I enter a data with special characters such as a double quote, the jsp converts the double quotes to & quot; (I put the space between & and q deliberately because it wont let me write it otherwise)
This is a mismatch, and even if the user has made no changes in the textbox value, the alert msg still comes up.
The text box contains the value G"DA. Database contains the value G"DA, but when I use <bean:write>, the HTML page contains G& quot;DA.
Please help.