Do you know how to format the output of something in JS? For example, if you want to show the social security number of someone, which is nine digits long, but you want to mask the first 5 digits and only show the last 4, BUT when they hit save, you want the original numbers saved, not the * or the #.
So if someones social security number is 123-45-6789, you want it to show ***-**-6789, but if they hit save, it saves 123456789 to the database.
I can make the JSP side show this properly and have made it read only, but then the problem is that when I hit submit, I get an error saying that the field is incomplete, so I would need to send the information already stored for the path in the jsp.
I think if you're at all concerned about the security of someone's social security number then you shouldn't be sending it with the web page in the first place. What is the scenario you're trying to protect against by hiding some but not all of it? What does the user gain by being able to edit the field?