<%@ taglib uri="/weblogic/taglib/sql" prefix="sql" %>

<html>
<head>
<title>Custom SQL JSP Tags</title>
</head>

<body>
<font face="Helvetica">

<h1>Employee Database:</h1>

<blockquote>

<sql:connection pool_name="demoPool">

<% String query = "SELECT * FROM emp"; %>

<p> Making a query: 
<font face="Courier New" size=-1 color=navy><%= query %></font>

<sql:query id="employees" sql="<%= query %>" >

<p> Here are the results...


<p><blockquote>

<table border=1>

<tr bgcolor=#DDDDFF>
    <th>Employee Name</th>
    <th>Job Role</th>
</tr>

<sql:results from_query="employees">

<tr>
    <td><%= employees.getString("ename") %></td>
    <td><%= employees.getString("job") %></td>
</tr>

</sql:results>

</table>

</blockquote>

</sql:query>

</sql:connection>

</body>
</html>
