0
可能重複:
how to display data obtained from dao in jsp無法在JSP中顯示從DAO獲得的數據
您好我能夠檢索數據並打印在控制檯上,但我無法打印在jsp下面的數據是道的代碼
while(rs.next())
{
System.out.println(rs.getString(1) +" " + rs.getString(2)+ " "+rs.getString(3) +" " + rs.getString(4)+"<br>");
SearchProjVO projVO = new SearchProjVO();
projVO.setProjid(rs.getString(1));
projVO.setProjname(rs.getString(2));
projVO.setCost(rs.getString(3));
projVO.setManager(rs.getString(4));
ar.add(projVO);
}
在jsp我在調用這些變量在fol降脂格式這是正確的
<td class="td-highlighted-2">
<div align="left"><a href="UpdateProject.html">${resultList.projId}</a></div>
</td>
<td class="td-highlighted-2">
<div align="left">${resultList.projName}</div>
</td>
<td class="td-highlighted-2">
<div align="left">${resultList.cost}</div>
</td>
<td class="td-highlighted-2">
<div align="left">${resultList.manager}</div>
</td>
</tr>
</c:forEach>
你怎麼把值從dao傳遞給jsp? – Bozho 2011-03-08 11:47:45