hi, in order to display the query result in a jsp; in my servlet i do the followwing:
try {
s= HibernateUtil.currentSession();
tx=s.beginTransaction();
Query query = s.createQuery("select opcemployees.Nom,opcemployees.Prenom,dailytimesheet.TrackingDate,dailytimesheet.Activity," +
"dailytimesheet.ProjectCode,dailytimesheet.WAName,dailytimesheet.TaskCode," +
"dailytimesheet.TimeSpent,dailytimesheet.PercentTaskComplete from Opcemployees opcemployees,Dailytimesheet dailytimesheet " +
"where opcemployees.Matricule=dailytimesheet.Matricule and dailytimesheet.Etat=3 " +
"group by opcemployees.Nom,opcemployees.Prenom" );
to execute query and store it in a list :
List opdts=query.list();request.setAttribute("items", opdts);
request.getRequestDispatcher("EspaceValidation.jsp").forward(request, response);
} catch (HibernateException e){ e.printStackTrace();}
and in jsp it is like this:
<table>
<c:forEach items="${items}" var="item">
<tr>
<td>${item}</td>
</tr>
</c:forEach>
the problem that I can't approperlly display the right values of this request.
thank you for help.