I have read this jsp page encoding problem and this Save Chinese characters with Spring-MVC / Java
I had the following code fragment in web.xml since the start of my project and it seems to injected correctly:
<!-- Reads request input using UTF-8 encoding -->
<filter>
<filter-name>characterEncodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>characterEncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
And the http request has this header "content-type:application/x-www-form-urlencoded; charset=UTF-8" set but the log line shows this: Request Body Bean:[UserBean@4a8da092 fristname = '??', lastname = '??']
Also something wield is that I use NetBeans, if I mouse over to the variable firstname and lastname, they are shown correctly. Not sure what else do I need to get it working. Any help would be appreciated.