某些中文页面输入后存入DB后成乱码

1:注意配置编码集为GBK
  Weblogic.xml
  <jsp-descriptor>
    <jsp-param>
      <param-name>pageCheckSeconds</param-name>
      <param-value>1</param-value>
    </jsp-param>
    <jsp-param>
      <param-name>compilerSupportsEncoding</param-name>
      <param-value>true</param-value>
    </jsp-param>
    <jsp-param>
      <param-name>encoding</param-name>
      <param-value>GBK</param-value>
    </jsp-param>
    <jsp-param>
      <param-name>verbose</param-name>
      <param-value>true</param-value>
    </jsp-param>
    <jsp-param>
      <param-name>printNulls</param-name>
      <param-value>false</param-value>
    </jsp-param>
    <jsp-param>
      <param-name>keepgenerated</param-name>
      <param-value>true</param-value>
    </jsp-param>
  </jsp-descriptor>


  Web.xml
  <filter>
    <filter-name>Set Character Encoding</filter-name>
    <filter-class>com.paic.pafa.app.web.filter.CharacterEncodingFilter</filter-class>
    <init-param>
      <param-name>encoding</param-name>
      <param-value>GBK</param-value>
    </init-param>
  </filter>

你可能感兴趣的:(xml,Web,weblogic)