When Struts Form submits a normal control, the values obtained in the action are garbled. To use Filter to process
EncodingFilter categories: / * (non-Javadoc) * @see javax.servlet.Filter # init (javax.servlet.FilterConfig) * / public void init (FilterConfig fc) throws ServletException {String s = fc.getInitParameter ( "Encoding") ; If (s! = Null) {this.Encoding = s;}}
/ * (Non-Javadoc) * @see javax.servlet.Filter # doFilter (javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain) * / public void doFilter (ServletRequest request, ServletResponse response, FilterChain fc ) throws IOException, ServletException {request.setCharacterEncoding (encoding); fc.doFilter (request, response);} / * (non-Javadoc) * @see javax.servlet.Filter # destroy () * / public void destroy () { } Please refresh the project when CVS in Eclipse