When springmvc is handling static html files, its returned header is:
Content-Type: text/html
but what I want is:
Content-Type: text/html; charset=utf-8
When springmvc is handling jsp files, its returned header is:
Content-Type: text/html; charset=ISO-8859-1
but what I want is:
Content-Type: text/html; charset=utf-8
I hate adding code:
<%@ page pageEncoding="utf-8"%>
in every jsp files, I just want springmvc to assume my all jsp files are utf-8 encoded.
I have already added
<!-- encoding filter -->
<filter>
<filter-name>Filter_CharacterEncoding</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>
</filter>
<filter-mapping>
<filter-name>Filter_CharacterEncoding</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
in my web.xml, but it has no use