📄 catalogtable.tag
字号:
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/sql_rt" prefix="sql" %>
<sql:setDataSource url="jdbc:mysql://localhost/catalog"
driver="org.gjt.mm.mysql.Driver"
user="catalogDBA" password="wrox"/>
<sql:query var="catalog">
<jsp:doBody/>
</sql:query>
<table width="100%">
<tr>
<th>
Item
</th>
<th>
Description
</th>
<th>
Price
</th>
</tr>
<c:forEach varStatus="status" var="row"
items="${catalog.rows}">
<tr>
<td>
${row.name}
</td>
<td>
${row.description}
</td>
<td class="price">
<fmt:formatNumber value="${row.price / 100}"
type="currency"/>
</td>
</tr>
</c:forEach>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -