<%@ page language="java" contentType="text/html;charset=Windows-31J"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"%>
<html><body>
<sql:setDataSource dataSource="jdbc/datasource" var="db"/>
<sql:query sql="select * from emp where salary > ? " var="rs" dataSource="${db}" >
<sql:param value="200" />
</sql:query>
<table border="1">
<c:forEach var="rec" items="${rs.rows}" >
<tr>
<td><c:out value="${rec.emp_id}" /></td>
<td><c:out value="${rec.emp_name}" /></td>
<td><c:out value="${rec.salary}" /></td>
</tr>
</c:forEach>
</table>
</body></html>
|