booknewslist.jsp
来自「beginJsp2.0外文书籍源代码」· JSP 代码 · 共 38 行
JSP
38 行
<%@page contentType="text/html"%><%@taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%><%@taglib prefix="sql" uri="http://java.sun.com/jstl/sql_rt"%><%@taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt"%><%@taglib prefix="html" uri="http://jakarta.apache.org/struts/tags-html-1.0"%><%@taglib prefix="bean" uri="http://jakarta.apache.org/struts/tags-bean-1.0"%><sql:query var="news" dataSource="${applicationScope['org.apache.struts.action.DATA_SOURCE']}"> select book_news.*, book.title as booktitle from book_news, book where book_news.book = book.id order by published desc</sql:query><table width="100%"> <c:forEach var="item" items="${news.rows}"> <tr> <td class="title"> <html:link page="/book/edit.do?id=${item.book}"> ${item.booktitle} </html:link>: ${item.title} </td> </tr> <tr> <td> ${item.body} [<fmt:formatDate value="${item.published}" type="both" dateStyle="short" timeStyle="short"/>] </td> </tr> </c:forEach> <c:if test="${empty news.rows}"> <tr> <td class="title"><bean:message key="booknewslist.nonews"/></td> </tr> </c:if></table>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?