Hi all.
I'm using JSTL (Java Standard Tag Library), the EL (Expression Language) version. I
have a DB where one particual query can return exactly one row (primary key). So, I
use this:
<sql:setDataSource dataSource="jdbc/EVracunDS"/>
<sql:query var="userData">
SELECT * FROM user_tab WHERE user_id = ?
<sql:param value="${userID}"/>
</sql:query>
This works just fine and I can iterate over it using <c:forEach>.
<c:forEach items="${userData}" var="userRow">
...
</c:forEach>
I would like to be able to access the row directly, since I'm 100% sure there will be
only one. Trying this, fails:
<c:out value="${suerData[0].user_id}"/>
or
<c:set var="userRow" value="${userData[0]}"/>
Can anyone advise?
JSTL implementation is Jakarta-Standard-1.0.3
Nix.