I am trying to use jstl, but on my web page, its not really passing the list I’d like to pass.I was expecting to show the job’s detail like id, butI can just get something like:
${job.jobId}
appear on my web page.
In my controller,
@RequestMapping(value="/jobDetail.action")
public ModelAndView jobDetailView() throws DBConnectionException {
ModelAndView mav = new ModelAndView();
//Map<String, List<Job>> message = new HashMap<String, List<Job>>();
jobs = jobdao.getAllJobs();
mav.setViewName("jobDetail");
mav.addObject("jobs",jobs);
return mav;
}
In the jsp:
<table >
<tr>
<td>Job Name</td>
<td>Job Owner</td>
<td>Description</td>
<td>Status</td>
</tr>
<c:forEach items="${jobs}" var="job">
<tr>
<td>${job.jobId}</td>
<td><c:out value="${job.notifier}"/></td>
<td><c:out value="${job.description}"/></td>
<td><c:out value="${job.jobStatus}"/></td>
</tr>
</c:forEach>
</table>
Could anyone please give me some suggestion? Did I use jstl in the wrong way?
Thanks a lot!
solved. it’s because the title in html file
This line makes my include of jstl not visible.