struts1.2 顯示多維數組

jsp page:

<logic:iterate name="systemInfo" property="systemInfos" id="sys">
   <%
    String[] str = (String[]) sys;
   %>
    <TR class="rowodd  roweven" >
      <TD align=left  height=20 nowrap><%= str[0]%></TD>
      <TD align=left  width=100%><%= str[1]%></TD>
    
    </TR>

</logic:iterate>

java code :

arraylist.add(new String[] { "JVM Version and Vendor", SystemUtils.JAVA_VM_VERSION + " " + SystemUtils.JAVA_VM_VENDOR });

short sumary:

then varialbe defined in  struts tag,  can be used in jsp.

 

發佈了53 篇原創文章 · 獲贊 2 · 訪問量 3340
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章