核心提示:1、解决post提交乱码:在web.xml中加入 CharacterEncodingFilter org.springframework.web.filter.CharacterEncodingF...
1、解决post提交乱码:在web.xml中加入
CharacterEncodingFilter org.springframework.web.filter.CharacterEncodingFilter encoding utf-8 CharacterEncodingFilter /*
2、解决get提交乱码问题:
方法一:
找到service.xml
修改代码:
方法二:
对参数进行重新编码:
String userNamenew
String(request.getParamter("userName").getBytes("ISO8859-1"),"utf-8")