Forum Stats

  • 3,817,474 Users
  • 2,259,339 Discussions


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

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="${ }"/>

<c:forEach var="row" items="${emp.rows}">
Your designation is : ${row.desig}
This discussion has been closed.