Listing 2: catalogQuery.jsp
<%@ taglib prefix="sql"
uri="http://java.sun.com/jsp/jstl/sql" %>
<%@ taglib prefix="c"
uri="http://java.sun.com/jsp/jstl/core" %>
<sql:setDataSource driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/test" user="root"/>
<sql:query var="catalog" sql="SELECT * FROM CATALOG">
</sql:query>
<table border>
<h3>Journal Catalog</h3>
<tr>
<td><b>CatalogId</b></td>
<td><b>Journal</b></td>
<td><b>Publisher</b></td>
<td><b>Edition</b></td>
<td><b>Title</b></td>
<td><b>Author</b></td>
</tr>
<c:forEach var="journal" items="${catalog.rows}">
<tr>
<td><c:out value="${journal.CatalogId}"/></td>
<td><c:out value="${journal.Journal}"/></td>
<td><c:out value="${journal.Publisher}"/></td>
<td><c:out value="${journal.Edition}"/></td>
<td><c:out value="${journal.Title}"/></td>
<td><c:out value="${journal.Author}"/></td>
</tr>
</c:forEach>
</table>
New on the Java Boutique:
New Review:
Time Management Made Easy with the Quartz Enterprise Job Scheduler
Why not just use the Java timer API? This open source scheduling
API boasts simplicity, ease-of-integration, a well-rounded feature
set, and it's free!
New Applet:
Reverse Complement
Reverse Complement is a simple applet that converts DNA or RNA
sequences into three useful formats.
Elsewhere on internet.com:
WebDeveloper Java
Lots of Java information on webdeveloper.com
WDVL Java
Thorough Java resource at the Web Developer's Virtual Library.
ScriptSearch Java
Hundreds of free Java code files to download.
jGuru: Your View of the Java Universe
Customizable portal with online training, FAQs, regular news updates, and tutorials.
|