应该是编码问题,页面的charset设置了吗?

解决方案 »

  1.   

    x:\j2sdk1.4.1\bin\native2asc ApplicationResources.properties xxx.propertiesnative2asc是jdk的一个工具
      

  2.   

    实际你可以简单的用javascript来控制提交,像struts那样配置也不简单
      

  3.   

    button.saveA1order=存A1定单
    button.saveA2order=存A2定单
    是经native2asc转换之前的内容。
      

  4.   

    不一定非得什么都用struts.可以用一部份.再配合javascript.个人觉得比较好一些
      

  5.   

    本人已经找到解决办法,以下代码引至stingJavaNet(stingJavaNet),在此表示感谢!
    过滤器代码:
    public class EncodingFilter
        implements Filter
    {
        /**
         * The default character encoding to set for requests that pass through
         * this filter.
         */
        protected String encoding = null;    /**
         * The filter configuration object we are associated with. If this value
         * is null, this filter instance is not currently configured.
         */
        protected FilterConfig filterConfig = null;    /**
         * Should a character encoding specified by the client be ignored?
         */
        protected boolean ignore = true;    /**
         * Take this filter out of service.
         */
        public void destroy()
        {
            this.encoding = null;
            this.filterConfig = null;
        }    /**
         *选择并设置这个request要使用的字符编码
         */
        public void doFilter(ServletRequest request, ServletResponse response,
                             FilterChain chain) throws IOException,
            ServletException
        {
            if (ignore || (request.getCharacterEncoding() == null))
            {
                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");
            String value = filterConfig.getInitParameter("ignore");
            if (value == null)
            {
                this.ignore = true;
            }
            else if (value.equalsIgnoreCase("true"))
            {
                this.ignore = true;
            }
            else if (value.equalsIgnoreCase("yes"))
            {
                this.ignore = true;
            }
            else
            {
                this.ignore = false;
            }
        }    /**
         *选择要使用的字符编码
         */
        protected String selectEncoding(ServletRequest request)
        {
            return (this.encoding);
        }}在web.xml中相应的配置