日期:2014-05-18 浏览次数:20742 次
@RequestMapping("/req")
public void req(HttpServletRequest request,HttpServletResponse response,String id){
System.out.println(id);
}
public String getParameter(String name) {
String value = super.getParameter(name);
if(map!=null&&map.get(name)!=null){
value = (String)map.get(name);
}
return value;
}
/**
* ParameterMap
*/
public Map<String, String[]> getParameterMap() {
Map<String, String[]> map = new HashMap<String, String[]>();
map.putAll(super.getParameterMap());
try {
List<String> ls = new ArrayList<String>();
for (String str : map.keySet()) {
String[] s = map.get(str);
for (String v : s) {
ls.add(new XssFilter().filter(v));
}
map.put(str, ls.toArray(new String[ls.size()]));
}
} catch (Exception e) {
e.printStackTrace();
}
return map;
}