<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國際加速解決方案。 廣告
                ## 往ValueStack的root區存數據 ### action屬性方式 ~~~ public class HelloAction extends ActionSupport { private String username; public String getUsername() { return username; } public String index() { //往值棧的root區存數據 username = "jack"; //從值棧中獲取數據 ValueStack valueStack = ActionContext.getContext().getValueStack(); String username = valueStack.findString("username"); System.out.println(username); return SUCCESS; } } ~~~ 頁面:root區獲取 數據不需要加#號,context區需要加#號. ~~~ <s:property value="username"></s:property> //類似調用valueStack.find('username') ~~~ ![](https://box.kancloud.cn/86f45ece329ba9f6cd4222265db5ccbb_1614x718.png) ### ValueStack的API方式 ~~~ public class HelloAction extends ActionSupport { public String index() { User user = new User(); user.setName("jack"); user.setAge(20); //獲取root區 ValueStack valueStack = ActionContext.getContext().getValueStack(); CompoundRoot root = valueStack.getRoot(); //往root區存放數據 root.push(user); return SUCCESS; } } ~~~ 頁面: ~~~ <s:property value="name"></s:property> <s:property value="age"></s:property> ~~~ ## 注意 不止當前訪問的action在root區,如果當前action實現modelDriver接口,modelDriver接口里面封裝的對象也在root區域.
                  <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>

                              哎呀哎呀视频在线观看