I spot several mistakes:
Here,
<c:forEach items="${resultList}" var="resultList">
You're overriding the list value with the value of the list item everytime. Don't do that. Give the var
an unique variable name. The entity name is the most straightforward choice.
<c:forEach items="${resultList}" var="project">
Note that I'd personally also rename the nothing-saying resultList
to a more self-explaining projects
.
And here,
<tr class="bg-row1">
<c:forEach items="${resultList}" var="project">
the flow is wrong. You should print a new row inside each loop. Swap them.
<c:forEach items="${resultList}" var="project">
<tr class="bg-row1">
And here,
${resultList.Projid}
${resultList.Projname}
${resultList.Cost}
${resultList.Manager}
the property names must start with lowercase (and fix the item name to be the same as in var
).
${project.projid}
${project.projname}
${project.cost}
${project.manager}
Note that I'd personally also get rid of proj
prefix in some property names.
And finally you're forgotten a closing </c:forEach>
.
</tr>
</c:forEach>
Unrelated to the concrete problem, your JDBC code is sensitive to SQL injection attacks and is leaking resources. Fix it as well.