在servlet对应的doGet或者doPost方法中使用request对象的setCharacterEncoding(“编码格式”)方法即可; 例:req.setCharacterEncoding(“UTF-8”);