I am using tomcat 9, Servlet version 4 ,java version 11, eclipse ide , spring 5.1.5 and chrome
trying to get model attribute values populated in jsp
list-customers jsp code has the below taglib and page dir
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page isELIgnored="false" %>
code for iteration of model attributes is as below inside table block
<c:forEach var="tempCustomers" items="${customers}">
<tr><td>${tempCustomers.firstName}</td>
</tr>
</c:forEach>
Controller Code
@Controller
@RequestMapping("/customer")
public class CustomerController {
@Autowired
private CustomerDAO cusdao;
@RequestMapping("/list")
public String listCustomers(Model model) {
List <Customer> custs= cusdao.getCustomer();
model.addAttribute("customers",custs);
return "list-customers";
}
The html output simply has with nothing in between Please let me know how to resolve this issue
i have jars jakarta.servlet.jsp.jstl-1.2.6.jar, jakarta.servlet.jsp.jstl-api-1.2.7.jar, javax.servlet-api-4.0.1.jar in WEB-INF/lib.
Apart from this not getting any error or exception