JSTL + SPRING + HIBERNATE Chinese garbled problem solved

xiaoxiao2021-03-05  22

Add in Web.xml:

SetCharacterEncoding org.springframework.web.filter.CharacterEncodingFilter encoding BIG5

setcharacterencoding *. jsp

* -Servlet.xml Add:

org.springframework.web.servlet.view.JstlView < / Property> / web-inf / jsp / .jsp text / html; charSet = BIG5

Add:

<% @Page ContentType = "Text / HTML; Charset = BIG5"%>

Note: I took the above ways, but I still failed to completely solve garbled problems, because I used the class of Extends SimpleFormController, I guessing is in Person Person = (Person) cmd; there is already garbled, so, so, so After it added a process, Person.SETPNAME (New String (Person.getPName (). GetBytes (), "BIG5"))); you can deposit traditional Chinese ~~~

转载请注明原文地址:https://www.9cbs.com/read-36157.html

New Post(0)