<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國際加速解決方案。 廣告
                在struts中,我們同樣使用標簽的形式來顯示動態數據。循環輸出 List數據的標簽為iterator, 在使用標簽以前,我們需要在JSP文件中,引用這個標簽庫. ## 引用標簽庫 ``` <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@ taglib prefix="s" uri="/struts-tags"%> <html> ``` 其中,prefix="前綴",其它的為引用struts標簽的固定寫法。 ## 使用標簽顯示數據 ``` <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@ taglib prefix="s" uri="/struts-tags"%> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>教師管理</title> </head> <body> <table> <tr> <th>序號</th> <th>姓名</th> <th>用戶名</th> <th>性別</th> <th>郵箱</th> </tr> <!-- s為我們在文件頭定位的標簽前綴。iterator是struts用于循環輸出List的標簽 --> <!-- teachers:自動調用C層的getTeachers();var=teacher:在循環體中使用的變量名 --> <s:iterator value="teachers" var="teacher"> <tr> <td>1</td> <!-- property輸出變量 teacher為內部變量,前面加入# --> <td><s:property value="#teacher.name" /></td> <td><s:property value="#teacher.username" /></td> <td><s:property value="#teacher.sex" /></td> <td><s:property value="#teacher.email" /></td> </tr> </s:iterator> </table> </body> </html> ``` > 官方標簽庫使用文檔: [https://struts.apache.org/docs/tag-developers-guide.html](https://struts.apache.org/docs/tag-developers-guide.html) 如果你已經有了TP標簽使用的經驗,相信對上述代碼的理解一定會更深入一些。 # 測試 ![](https://box.kancloud.cn/b9dcefc5124ea739385727777900bd97_373x121.png)
                  <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>

                              哎呀哎呀视频在线观看