如果你发现Spring 4 MVC的Post请请求乱码,请添加accept-charset的标签为utf-8就能解决,如下:
<form name="user" action="add.html" method="post" accept-charset="utf-8"> Firstname: <input type="text" name="firstname"> <br> Lastname: <input type="text" name="lastname"> <br> <input type="submit" value=" Save "> </form>
时间: 2024-10-11 17:52:25