- public void doGet(HttpServletRequest request, HttpServletResponse response)
- throws ServletException, IOException {
- response.setContentType("text/html;charset=gb2312");在PrintWriter前面有效果
- PrintWriter out = response.getWriter();
- request.setCharacterEncoding("utf-8");
- // response.setContentType("text/html;charset=gb2312");在PrintWriter后面无效果
- userId1 = request.getParameter("userId1");// ///需要2个参数
- userId2 = request.getParameter("userId2");
-
关于servlet中文输出的解决方案
最新推荐文章于 2023-04-16 18:49:29 发布