0
点赞
收藏
分享

微信扫一扫

jsp新代码第238课

狐沐说 2022-05-16 阅读 194


new238.jsp

<%@page import="java.util.Iterator"%>
<%@page import="pack03.new240"%>
<%@page import="pack03.new239"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>留言信息表</title>
</head>
<body>
<h2>所有留言如下:</h2>
<table border="1" width="40%">
<tr>
<th>留言标题</th>
<th>内容</th>
<th>作者</th>
<th>发布时间</th>
</tr>
<%
new239 noteBean = new new239();
List<new240> noteList = noteBean.findAllNotes();
Iterator<new240> noteIt = noteList.iterator();
while(noteIt.hasNext())
{
new240 tn = (new240)noteIt.next();
out.print("<tr>");
out.print("<td>"+ tn.getTitle() +"</td>");
out.print("<td>"+ tn.getContent() +"</td>");
out.print("<td>"+ tn.getAuthor() +"</td>");
out.print("<td>"+ tn.getCreateTime() +"</td>");
out.print("</tr>");
}

%>
</table>
</body>
</html>


举报

相关推荐

0 条评论