Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Null value for a column field when using jstl sql tags.

826025Oct 16 2011
I used jstl sql tags to perform a database operation but i get null value for a column field.
And i got the field value when i used it with scriptlet. Whats wrong here?

<sql:setDataSource var="db" driver="sun.jdbc.odbc.JdbcOdbcDriver" url="jdbc:odbc:db" user="root" password="1234" />
<sql:query var="emp" dataSource="${db}">
select desig from employee where emp_id=?
<sql:param value="${param.id }"/>
</sql:query>

<c:forEach var="row" items="${emp.rows}">
Your designation is : ${row.desig}
</c:forEach>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 13 2011
Added on Oct 16 2011
0 comments
141 views