|
Revision 22, 0.9 KB
(checked in by yabuki, 3 years ago)
|
|
|
-
Property svn:mime-type set to
text/plain
|
| Line | |
|---|
| 1 | <?xml version="1.0" encoding="UTF-8" ?> |
|---|
| 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" %> |
|---|
| 3 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> |
|---|
| 4 | <%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %> |
|---|
| 5 | |
|---|
| 6 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
|---|
| 7 | <html xmlns="http://www.w3.org/1999/xhtml"> |
|---|
| 8 | <head> |
|---|
| 9 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
|---|
| 10 | <title>テーブル内容の表示(コネクション・プール)</title> |
|---|
| 11 | </head> |
|---|
| 12 | <body> |
|---|
| 13 | |
|---|
| 14 | <sql:query var="rs" dataSource="jdbc/mydb"> |
|---|
| 15 | SELECT * FROM samples |
|---|
| 16 | </sql:query> |
|---|
| 17 | |
|---|
| 18 | <table> |
|---|
| 19 | <tr><th>id</th><th>sample</th><th>memo</th></tr> |
|---|
| 20 | <c:forEach var="row" items="${rs.rows}"> |
|---|
| 21 | <tr> |
|---|
| 22 | <td><c:out value="${row.id}" /></td> |
|---|
| 23 | <td><c:out value="${row.sample}" /></td> |
|---|
| 24 | <td><c:out value="${row.memo}" /></td> |
|---|
| 25 | </tr> |
|---|
| 26 | </c:forEach> |
|---|
| 27 | </table> |
|---|
| 28 | |
|---|
| 29 | </body> |
|---|
| 30 | </html> |
|---|