在servlet中进行编码就可以了。request.setCharacterEncode("utf-8");//或者GBKString name = request.getParameter("name");