Hi, I am retreiving values from a database based on a parameter using hibernate and displaying the data using struts. The query i am using is
return session.createQuery("select a from Users as a where a.USERNAME like ?").setString(0,userName).list();
The code of the display page is <table> <tr> <s:iterator value="userList" status="userStatus"> <tr> <td><s:property value="USERNAME"/></td> <td><s:property value="ID" /></td> </tr> </s:iterator> </table>
The above code works fine. When i try to display only the username, using a.USERNAME in the query, i don't see any records.
|