Finally, I got it done ~
I used jquery-Impromptu in the project to add the dynamic effect of the user pop-up, but only the get method can be used to pass to struts, which involves text garbled. I once searched for N circles on Google and tried many methods, such as JS transcoding, but they didn't succeed...
This method is solved by using filters. [Effective for test-by-test ~]
First create a filter: http: // www. koders.com/java/fid0f44ef4578f6c04bb6a6b5ce1_dfe8b3520ab1d.aspx
I saved it in the util package and named it:Setcharacterencodingfilter. Java
Then add a filter in the project web. xml. My configuration is as follows:
filter>
filter-name>SetCharacterEncodingfilter-name>
filter-class>util.SetCharacterEncodingFilterfilter-class>
filter>
filter-mapping>
filter-name>SetCharacterEncodingfilter-name>
servlet-name>/*servlet-name>
filter-mapping>
init-param>
param-name>encodingparam-name>
param-value>UTF-8param-value>
init-param>
By the way, Hibernate's Chinese processing is really good ~~~
Solution Source: http://blog.csdn.net/senbar/archive/ 2006/12/10/1437024. aspx