<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> JSTL: SQL action examples

SQL Query Execution using an iterator

create table mytable ( nameid int primary key, name varchar(80) ) INSERT INTO mytable VALUES (1,'Paul Oakenfold') INSERT INTO mytable VALUES (2,'Timo Maas') INSERT INTO mytable VALUES (3,'Paul van Dyk') SELECT * FROM mytable

Iterating over each Row of the result


Iterating over Columns without knowing the index

Name: Value:

Putting it all together

<%-- Easiest example showing how to populate a table --%> <%-- Get the column names for the header of the table --%> <%-- Get the value of each column while iterating over rows --%>
drop table mytable