ServletFileUpload upload = new ServletFileUpload(factory);
//这里就是中文文件名处理的代码,其实只有一行,setHeaderEncoding就可以了
upload.setHeaderEncoding("utf-8");
在判断当前字段为普通字段时
if(item.isFormField()){
String name = item.getFieldName();
String value =item.getString("utf-8"); //单字段中文显示
System.out.println(name);
System.out.println(value);
request.setAttribute(name, value);
}