zoukankan      html  css  js  c++  java
  • alert 乱码(转 学习)

    项目中有一个 alert乱码问题,按照网上的方法改了很久不没反应,结果最终突然灵机一动想到了服务器的编码,结果ok了 ,花了好长时间阿,囧

    虽然项目全部采用了UTF-8编码,所有的源文件*.java,*.jsc,*.html,*.ftl都采用了UTF-8编码。可是还是出现了乱码问题。很是不爽,后来找到了tomcat,和resin的配置。

    1. Tomcat的配置。(conf/server.xml)
          <!--</span><span style="COLOR: rgb(0,128,0)"> Define a non-SSL HTTP/1.1 Connector on port 8080 </span><span style="COLOR: rgb(0,128,0)">-->
          
      <Connector port="80" maxHttpHeaderSize="8192"
                     maxThreads
      ="150" minSpareThreads="25" maxSpareThreads="75"
                     enableLookups
      ="false" redirectPort="8443" acceptCount="100"
                     connectionTimeout
      ="20000" disableUploadTimeout="true" URIEncoding="UTF-8"/>
    2. Resin的配置。(conf/resin.conf)

      character-encoding

      Resin 1.1
      child of: resin, server, host-default, host, web-app-default, web-app
      default: The default value is ISO-8859-1.

      Specifies the default character encoding for the environment.

  • 相关阅读:
    SGU 495 Kids and Prizes
    HDU 3853 LOOPS
    HDU 4089 Activation
    HDU 4405 Aeroplane chess
    ZOJ 3329 One Person Game
    POJ 2096 Collecting Bugs
    POJ1573(Robot Motion)
    poj2632(Crashing Robots)
    poj1068(Parencodings)
    poj2506(Tiling)
  • 原文地址:https://www.cnblogs.com/hitwtx/p/2290598.html
Copyright © 2011-2022 走看看