<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>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                ## 配置 struts2.xml文件: ~~~ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN" "http://struts.apache.org/dtds/struts-2.3.dtd"> <struts> <!--package作用是將相同的業務整合在一起--> <!--name:包名.意義不大.作用是給繼承用--> <!--namespace:給 action訪問的路徑標識一個前綴--> <!--extends:繼承. 默認值:默認繼承struts2提供的一個指定包,包名struts-default. 繼承哪個包,那這個包下所有東西都有一份--> <!--abstract:標識該包是否為抽象的,標識性屬性.標識該包不能獨立運行,專門被繼承--> <package name="default" namespace="/" extends="struts-default"> <!--action訪問路徑--> <!--name:action的名字,和瀏覽器訪問地址相關.namespace和name組成了瀏覽器的訪問地址--> <!--class:全限定名--> <!--method:指定調用Action中的那個方法 .可以不寫,默認執行一個叫execute的方法--> <action name="hello" class="com.like.HelloAction" method="hello"> <!--result:接收返回值--> <!--name:返回的別名對比--> <!--type:指定調用哪一個result類來處理結果.默認是請求轉發--> <result name="success" type="">/hello.jsp</result> </action> </package> </struts> ~~~ web.xml文件: ~~~ <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" version="4.0"> <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> </web-app> ~~~ ## struts2常量配置 三種方式: 加載順序也是如下.后加載的覆蓋前加載的 3-2-1. 1. 在src文件夾下創建struts.properties文件進行配置. 2. 在struts.xml中struts標簽中配置(一般使用這種). 3. 在web.xml中創建context-param標簽進行配置. ~~~ <!--i18n國際化:解決post提交的亂碼.get還得自己解決--> <constant name="struts.i18n.encoding" value="UTF-8"></constant> <!--指定訪問action時的后綴名:默認是action和空--> <constant name="struts.action.extension" value="action,php,"></constant> <!--指定struts是否以開發模式運行.開發環境可以熱加載struts.xml文件.提供更多的錯誤提示--> <constant name="struts.devMode" value="true"></constant> ~~~
                  <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>

                              哎呀哎呀视频在线观看