<!-- Collection of code snippets by Arne Vajhøj -->
<!-- (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) -->
<%@ page import="java.sql.*" %>
<table border>
<%
Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost/Test", "", "");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM T1");
while(rs.next()) {
%>
<tr>
<td><%=rs.getInt("F1")%></td>
<td><%=rs.getString("F2")%></td>
</tr>
<%
}
%>
<%
rs.close();
stmt.close();
con.close();
%>
</table>
