<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                之前在使用Maven時,創建一個We項目,有時候會用到EL表達式 ${message},會發現無法識別,顯示如下效果: ![](https://box.kancloud.cn/2016-09-06_57ce64fde1c37.jpg) 一直沒有明白為什么,今天,偶然間知道了原因。 如果你也遇到這樣的情況,來看一下你的web.xml文件: ~~~ <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd" > <web-app> <display-name>Archetype Created Web Application</display-name> <!-- 字符集 過濾器 --> <filter> <filter-name>CharacterEncodingFilter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> <init-param> <param-name>encoding</param-name> <param-value>UTF-8</param-value> </init-param> <init-param> <param-name>forceEncoding</param-name> <param-value>true</param-value> </init-param> </filter> <filter-mapping> <filter-name>CharacterEncodingFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <servlet> <servlet-name>helloworld</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>helloworld</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> </web-app> ~~~ 這是舊版本的web.xml格式,可以到Tomcat下找一個web.xml看一下區別: 舊版本的web.xml ![](https://box.kancloud.cn/2016-09-06_57ce64fe04683.jpg) 新版本的web.xml ![](https://box.kancloud.cn/2016-09-06_57ce64fe1d921.jpg) ![](https://box.kancloud.cn/2016-09-06_57ce64fe363f5.jpg) 把上面幾行標簽復制一下:(改成UTF-8) ![](https://box.kancloud.cn/2016-09-06_57ce64fe4dbde.jpg) 復制過去之后,重新啟動項目,在訪問一次那個界面: ![](https://box.kancloud.cn/2016-09-06_57ce64fe64fdb.jpg) 好了,已經可以正常使用了,![大笑](https://box.kancloud.cn/2016-01-19_569e21abc5518.gif) 。 這里還有一個方法也可以解決,但是比較麻煩,就是在JSP頁面上加上一行代碼:(JSP2.0中支持EL表達式,老版本不支持) ~~~ <%@ page isELIgnored ="false" %> ~~~ Web容器默認isELIgnored="false"。 如果設定為真,那么JSP中的表達式被當成字符串處理。 大家可以試一下。 注意: 這里,還遇到一個問題,就是將web.xml修改之后,依然不能識別EL表達式,后來發現是配置出了問題: ![](https://box.kancloud.cn/2016-09-06_57ce64fe82534.jpg) 注意這里的 Dynamic Web Module一定也要修改為2.5或者更高的版本 有這樣一句話:當然工程的版本、jdk版本、tomcat版本、jar的版本缺一不可 (摘自其他博客)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看