aa.jsp~24~
上传用户:toby828
上传日期:2015-06-26
资源大小:8558k
文件大小:1k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
  2. <%@ page import="com.dao.BookCaseDAO" %>
  3. <%@ page import="com.actionForm.BookCaseForm" %>
  4. <%@ page import="java.util.*"%>
  5. <html>
  6. <%
  7. Collection coll=(Collection)request.getAttribute("bookcase");
  8. %>
  9. <body>
  10. <%
  11. if(coll==null || coll.isEmpty()){
  12.   out.println("暂无数据");
  13. }else{
  14.   //通过迭代方式显示数据
  15.   Iterator it=coll.iterator();
  16.   while(it.hasNext()){
  17.     BookCaseForm bookCaseForm=(BookCaseForm)it.next();
  18.     out.println(bookCaseForm.getId());
  19.     out.println("<br>");
  20.     out.println(bookCaseForm.getName());
  21.     out.println("<br>");
  22.   }
  23. }
  24. %>
  25. <a href="bookcase_add.jsp">添加书架信息</a>
  26. </body>
  27. </html>