How to retrieve List content in JSP from Hibernate Query Language
Database
1
Posts
1
Posters
2
Views
1
Watching
-
I Developed the program that retrieve the content from Database and store it in the List
List studentList=session.createQuery("from Student s where s.lastName=:lastName and s.firstName=:firstName")
.setString("lastName",lname)
.setString("firstName",fname).list();
for(Student studentinfo:studentList)
{
System.out.println(studentinfo);
}
model.addAttribute("result",studentList);
And i have passed the result to the JSP File${result} ${item}
I am getting the result like this
"Student{id=6, firstName='arul', lastName='suju', address='s;lda'}"
But i want print the value one by one,Can any one suggest better code in JSP