1. 程式人生 > >Spring 4 MVC的post提交form時中文亂碼

Spring 4 MVC的post提交form時中文亂碼

pos track 亂碼 -a art charset ring value html

假設你發現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>



Spring 4 MVC的post提交form時中文亂碼