esapi防止sql注入的方法:
设置一个过滤器,代码示例:
String sqlStr=“select name from tableA where id=”+
ESAPI.encoder().encodeForSQL(ORACLE_CODEC,validatedUserId)
+“and date_created”='“
+ ESAPI.encoder()。encodeForSQL(ORACLE_CODEC,validatedStartDate)+"'";
myStmt = conn.createStatement(sqlStr);