Thank you for your answer. I tried the following steps you given below.
It seems you are using spring framework. I'm using IBM RAD. So as filter class i wrote a little code and other steps are ok. But nothing change for me, the problem persist.
Code for filter class is below;
public class EncodingFilter {
protected FilterConfig filterConfig;
protected String encoding;
public void doFilter(ServletRequest request,
ServletResponse response, FilterChain chain) throws
IOException, ServletException {
String encoding = selectEncoding(request);
if (encoding != null)
request.setCharacterEncoding(encoding);
chain.doFilter(request, response);
}
public void init(FilterConfig filterConfig) throws
ServletException {
this.filterConfig = filterConfig;
this.encoding = filterConfig.getInitParameter("encoding");
}
protected String selectEncoding(ServletRequest request) {
return (this.encoding);
}
}
pdshelke wrote:
Following are changes we made to work with japanese characters:
Changes in JSP Files:
a. Adding encoding type in JSP file as
<%@ page language="java" session="true" import="java.util.*" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8"%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
Changes in tld (tag Library Descriptor) Files:
a. Adding encoding type in “c-1_0.tld”, “fmt-1_0.tld”, “spring.tld” and “pager-taglib.tld” file as
<?xml version="1.0" encoding="UTF-8" ?>
Changes in web.xml File:
a. Finally to get request from jsp page as in UTF-8 encoding type format, set Character Encoding Filter in “web.xml” file as below
<filter>
<filter-name>encodingFilter</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>encodingFilter</filter-name>
<url-pattern>*.do</url-pattern>
</filter-mapping>
Configuration Change in Server.xml File:
a. Set URIEncoding as "UTF-8” in “server.xml” file