${x.UId }
${x.UName }
${x.UPwd }
actioin:
/**
* 全查询
*/
public ActionForward all(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
List list = this.userService.getAllUser();
request.setAttribute("myuser", list);
return mapping.findForward("all");
}
循环list 对每个元素 直接通过".属性名"取值就行了。list中放的元素是map对象。
${temObject.属性名}
就是单表查询然后显示塞。没有框架手动搞啊?
1、struts配置好返回的页面。
2、jsp页面写java代码。用<%......%>
3、jsp页面用request.get。。。(后面英文不记得了)接收返回的list
4、for循环一行行取出list里面的值,然后赋值给实体类。
5、实体类get出某一个值放td里面。
6、td包含在for里面。
搞定 收工
${item.属性名}