D
Drew Volpe
I'm working on an API to allow customers to extend our
software by writing their own JSPs. For the samples I'm
creating I'm trying to decide if I should use JSTLs or equivalent
Java code snippets. I think JSTLs make things neater (I'm a
Java developer with limited exposure to JSP), but I'm not sure
everyone will have them installed. How common are they ? And
which do most JSP developers prefer ?
ie, either:
<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
<sql:query var="sample">
SELECT * FROM sample WHERE id = 1
</sql:query>
or this:
<%
Connection connection =
DriverManager.getConnection(url, dbUserName, dbUserPassword);
String sqlCommand = "SELECT * FROM sample WHERE id = 1";
ResultSet rs = connection.createStatement().executeQuery(sqlCommand);
rs.next(); // take first one for now
%>
thoughts ?
dv
--
--------------------------------------------------------------------------
The geographical center of Boston is in Roxbury. Due north of the
center we find the South End. This is not to be confused with South
Boston which lies directly east from the South End. North of the South
End is East Boston and southwest of East Boston is the North End.
Drew Volpe, mylastname at hcs o harvard o edu
software by writing their own JSPs. For the samples I'm
creating I'm trying to decide if I should use JSTLs or equivalent
Java code snippets. I think JSTLs make things neater (I'm a
Java developer with limited exposure to JSP), but I'm not sure
everyone will have them installed. How common are they ? And
which do most JSP developers prefer ?
ie, either:
<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
<sql:query var="sample">
SELECT * FROM sample WHERE id = 1
</sql:query>
or this:
<%
Connection connection =
DriverManager.getConnection(url, dbUserName, dbUserPassword);
String sqlCommand = "SELECT * FROM sample WHERE id = 1";
ResultSet rs = connection.createStatement().executeQuery(sqlCommand);
rs.next(); // take first one for now
%>
thoughts ?
dv
--
--------------------------------------------------------------------------
The geographical center of Boston is in Roxbury. Due north of the
center we find the South End. This is not to be confused with South
Boston which lies directly east from the South End. North of the South
End is East Boston and southwest of East Boston is the North End.
Drew Volpe, mylastname at hcs o harvard o edu