jsp页面显示List中对象的属性三种方法

 
  
<%@page import="com.sun.xml.internal.fastinfoset.util.PrefixArray"%>
<%@ page language="java" import="java.util.*,com.zb.domain.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"  %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>



  
    
    
    My JSP 'goListEmp.jsp' starting page
    
	
	
	    
	
	
	

  
  
  
    
     <-- 方法一 for循环迭代-->
      <%  
                       List list=(List)request.getAttribute("empList");
                       for(int i=0;i
                        
                         
           <%              
      
                       }
      
          %> 
          
      
idnamepasswordemailhiredatesalarygradedepartment删除用户
<%=e.getId() %> <%=e.getName() %> <%=e.getPassword() %> <%=e.getEmail() %> <%=e.getHiredate() %> <%=e.getSalary() %> <%=e.getGrade() %> <%=e.getDep() %> 删除用户
${e.id} ${e.name} ${e.password} ${e.email} ${e.hiredate} ${e.salary} ${e.grade} ${e.dep.name} 删除用户
 
  
 
  
 
  
 
  
 
  
 
  
 
 

你可能感兴趣的:(jsp页面显示List中对象的属性三种方法)