Fri Oct 24, 2008 9:51 pm
Fri Oct 24, 2008 9:52 pm
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
// TODO Auto-generated method stub
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
response.setContentType("text/html;charset=utf-8");
chain.doFilter(request, response);
}
<filter>
<description>
Setting the character encoding of the request</description>
<display-name>
RequestEncodingFilter</display-name>
<filter-name>RequestEncodingFilter</filter-name>
<filter-class>CharacterEncodingFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>RequestEncodingFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.