I am using a filter to prevent xss by encoding html character of my jsp form parameters.
I am resolving them in jsp using ${param} expression.
This is working fine in tomcat as the values are resolved as is, but on weblogic the values are getting decoded, causing the XSS to succeed
I am using this simple code in jsp to test it
<c:set var="testing" value="eb011"><img src=a onerror=confirm(1)>47379"/>
<input type="hidden" name="encoding" value="${testing }"/>
Result in tomcat
<input type="hidden" onerror="confirm(1)>47379"/" src="a" ><img="" value="eb011" name="encoding">
Result in weblogic
<input type="hidden" value="eb011" name="encoding"><img onerror="confirm(1)" src="a">47379"/>
Please tell me why is weblogic decoding html codes and what could be done to prevent it.