JSP开发记录

技术分享
%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%
%@ page import="com.tgb.*" %
%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
List list=(List)request.getAttribute("list");
%
%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%

View Code

2.遍历list

技术分享技术分享
        c:forEach items="${list}" var="user" varStatus="vs"  
                tr   
                     td align = "center"${user.getID()}/td  
                     td align = "center"${user.getUserName()}/td  
                     td align = "center"${user.getPassword()}/td  
                     td align = "center"img src="${user.getHeadImage()}" style="height: 50px;width: 50px;"//td  
                      td
                          a href="user.html"i class="icon-pencil"/i/a
                          a href="#myModal" role="button" data-toggle="modal"i class="icon-remove"/i/a
                      /td                       
                 /tr  
        /c:forEach  

View Code

3.加载子页面

jsp:include page="../../layout/footer.jsp"/jsp:include

JSP开发记录

原文地址:http://www.cnblogs.com/liandy0906/p/7290751.html


最新回复(0)
/jishu6qLC1Cduh58z1sH3vsRISS1AI371wQ6wIZdyEw_3D_3D4719091
8 简首页