1、tomcat中的server.xml文件中加入 URIEncoding="GBK"。整體如下:<Connector port="8088"
                         maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
                         enableLookups="false" redirectPort="8443" acceptCount="100"
                         debug="0" connectionTimeout="20000"
                         disableUploadTimeout="true" URIEncoding="GBK" />。
          2、String username="";
          username=new String(username.getBytes("iso-8859-1"),"gb2312");//插入中文處理

          只有注冊用戶登錄后才能發(fā)表評論。


          網(wǎng)站導(dǎo)航:
           

          posts - 15, comments - 15, trackbacks - 0, articles - 2

          Copyright © 冰江獨行

          主站蜘蛛池模板: 比如县| 建阳市| 博乐市| 天等县| 紫阳县| 淮北市| 时尚| 天台县| 祁阳县| 巩留县| 宜黄县| 方正县| 黔西县| 洱源县| 乌恰县| 潮安县| 江北区| 仁寿县| 桓台县| 玉田县| 三都| 久治县| 铜梁县| 卢氏县| 鄂托克前旗| 浙江省| 平原县| 读书| 从江县| 青冈县| 四会市| 五峰| 普安县| 林西县| 许昌县| 夏河县| 昌图县| 茶陵县| 景宁| 博乐市| 焉耆|