乱码发生的原因

1、页面设置

  <%@ page language="java" contentType="text/html; charset=UTF-8"%>

  <meta charset="utf-8"/>

2、tomcat中server.xml文件中设置

  设置URIEncoding="UTF-8"

3、myecplise中设置

4、提交form表单时默认为get提交,所以需要在form标签中加上mothod="post"

原文地址:https://www.cnblogs.com/zying3/p/10290621.html