I have a simple jsp that has 3 inputs (name, id and email) and a form submit. From doing some reading ,it looks like my input values should be encoded.How can I do this? Can anyone provide an example For eg
<td><input id="email" name="email" value=""/></td>
<td><input id="fullname" name="fullname" value=""/></td>
<td><input id="userId" name="userId" value=""/></td>
<input type ="submit" value ="Get User" />
How should the email, fullname and uerId be encoded? Also I have seen example as follows:
String safeOutput = ESAPI.encoder().encodeForHTML( Comment)
Should the encoding be done both to the HTML and to the java code? I would appreciate some tips,as I am confused about this. Thanks