SSH中数据的表现

1.已配置好Hibernate反向工程
2.
action:
 public ActionForward execute(ActionMapping mapping, ActionForm form,
   HttpServletRequest request, HttpServletResponse response)
   throws Exception {
  List all = null;
  try {
   all  = this.iadmindao.queryAll();
  } catch (Exception e) {
   e.printStackTrace();
  }
  request.setAttribute("all", all);
  return mapping.findForward("list");
 }
 
jsp:
<table>
<logic:iterate id="admin" name="all" scope="request">
<tr>
 <td>${admin.id}</td>
 <td>${admin.adminid}</td>
 <td>${admin.adminpwd}</td>
</tr>
</logic:iterate>

你可能感兴趣的:(ssh)