Java Reference
In-Depth Information
Just as we did in our last page, we can add a DB Report item from the NetBeans
palette so that we can visually inspect the effect of the <sql:update> tag. After
doing so, the body of our page looks like this:
<h2>Hello World!</h2>
<sql:update var="updatedRows" dataSource="jdbc/sample">
UPDATE customer
SET zip = '22033'
<sql:param value="Ensode%"/>
<sql:query var="result" dataSource="jdbc/sample">
SELECT customer_id, name, discount_code, zip
FROM customer where name like ?
<sql:param value="Ensode%" />
<table border="1">
<!-- column headers -->
<c:forEach var="columnName"
<th><c:out value="${columnName}"/></th>
<!-- column data -->
<c:forEach var="row" items="${result.rowsByIndex}">
<c:forEach var="column" items="${row}">
<td><c:out value="${column}"/></td>
Search WWH ::

Custom Search