---------------------------------------------------------------------------
struts2.xml
---------------------------------------------------------------------------
<action name="testTable" method="testTable" class="topoAction">
<result name="success">/analysis/alarm/testTable.jsp</result>
</action>
---------------------------------------------------------------------------
topoAction.java
---------------------------------------------------------------------------
List<Test> recordList = new ArrayList<Test>();
get/set方法
public String testTable(){
recordList = ...;
return "success";
}
---------------------------------------------------------------------------
testTable.jsp
---------------------------------------------------------------------------
dtable1=$( '#example').dataTable();
<table width="100%" height="" id="example" class="display" cellpadding="0" cellspacing= "0" border ="0">
<thead style="background-color:#5f7180">
<tr >
<th >编码</ th>
<th >型号</ th>
<th >姓名</ th>
</tr >
</thead >
<tbody >
<c:if test="${! empty recordList}" >
<c:forEach var = "recordData" items = "${recordList}" >
<tr >
<td >${recordData.maschineCode }</td>
<td >${recordData.maschineModel }</ td>
<td >${recordData.welderName }</ td>
</tr >
</c:forEach >
</c:if >
</tbody >
</table >