久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      tomcat在centos下出現(xiàn)中文亂碼怎么辦

      tomcat在centos下出現(xiàn)中文亂碼怎么辦

      1、設(shè)置當(dāng)前系統(tǒng)的語(yǔ)言環(huán)境為中文

      [root@iZ25bdzgev8Z ~]# locale  #查看當(dāng)前系統(tǒng)的語(yǔ)言環(huán)境 [root@iZ25bdzgev8Z ~]# yum -y install kde-l10n-Chinese  #安裝中文語(yǔ)言包, yum源配置在阿里 [root@iZ25bdzgev8Z ~]# yum reinstall glibc-common [root@iZ25bdzgev8Z ~]# LANG="zh_CN.UTF-8"

      2. 編輯server.xml文件,進(jìn)行如下修改

      <Connector port="9999" protocol="HTTP/1.1"     connectionTimeout="20000" URIEncoding="UTF-8"  useBodyEncodingForURI=”true”     redirectPort="8443" /> <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" URIEncoding="UTF-8"   />

      3、編輯項(xiàng)目下的數(shù)據(jù)庫(kù)連接文件/var/lib/tomcat/webapps/myproject/WEB-INF/classes/config.properties,修改如下:

      jdbc.url=jdbc:mysql://IP地址:3306/ myprojectDB?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useOldAliasMetadataBehavior=true

      4、修改Web.xml文件

      <servlet>     <servlet-name>login</servlet-name>     <servlet-class>cn.hncu.servlets.LoginServlet</servlet-class>     <init-param>         <param-name>character</param-name>         <param-value>GBK</param-value>     </init-param> </servlet>

      5、針對(duì)mysql進(jìn)行字符設(shè)置

      mysql> show variables like 'character_set_database'; mysql> alter database 庫(kù)名 CHARACTER SET utf-8;

      推薦教程:centos教程

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)