Satish Talim wrote the following on 10/13/2004 2:00 AM:
I am using JBoss 4.0 (which I believe is a Servlet 2.4 / JSP 2.0 container) and Struts 1.2.4.
I want to use JSTL 1.1 with Struts and JBoss. For example, I would like to use something like this:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
..
<c:choose>
<c:when test="${empDbInfo.rowCount == 0}">
<sql:update>
INSERT INTO Employee (UserName, Password, FirstName, LastName, Dept, EmpDate, EmailAddr, ModDate)
VALUES(?, ?, ?, ?, ?, ?, ?, ?)
<sql:param value="${param.userName}" />
<sql:param value="${param.password}" />
<sql:param value="${param.firstName}" />
<sql:param value="${param.lastName}" />
<sql:param value="${param.dept}" />
<sql:dateParam value="${parsedEmpDate}" type="date" />
<sql:param value="${param.emailAddr}" />
<sql:dateParam value="${now}" />
</sql:update>
</c:when>
<c:otherwise>
<sql:update>
UPDATE Employee
SET Password = ?, FirstName = ?, LastName = ?, Dept = ?,
EmpDate = ?,
EmailAddr = ?,
ModDate = ?
WHERE UserName = ?
<sql:param value="${param.password}" />
<sql:param value="${param.firstName}" />
<sql:param value="${param.lastName}" />
<sql:param value="${param.dept}" />
<sql:dateParam value="${parsedEmpDate}" type="date" />
<sql:param value="${param.emailAddr}" />
<sql:dateParam value="${now}" />
<sql:param value="${param.userName}" />
</sql:update>
</c:otherwise>
</c:choose>
-- Rick
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]