This discussion is archived
0 Replies Latest reply: Oct 16, 2011 9:55 AM by 826025 RSS

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

826025 Newbie
Currently Being Moderated
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}


  • Correct Answers - 10 points
  • Helpful Answers - 5 points