zoukankan      html  css  js  c++  java
  • JSP开发记录

    1.基础属性

    <%@ 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; 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>

  • 相关阅读:
    从视频中每隔固定帧进行提取图片
    np.concatenate的超简单理解
    python-OOP(面向对象)
    机器学习中的ground truth
    深度学习网络中backbone是什么意思?
    缓存
    Linux基础命令
    openoffice相关命令
    HTTP协议
    Solr基础
  • 原文地址:https://www.cnblogs.com/liandy0906/p/7290751.html
Copyright © 2011-2022 走看看