here i'm setting data at students i want to print value from Arraylist to jsp page
this is servlet class
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
studentDao =new StudentDao();
List<Student> studentList=studentDao.display();
request.setAttribute("students",studentList);
for(Student stu:studentList){
System.out.println(stu.getAge()+" " +stu.getStudentName());
}
RequestDispatcher requestDispatcher=getServletContext().getRequestDispatcher("/viewstudent.jsp");
requestDispatcher.forward(request,response);
}//method end
//this is jsp page
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix = "c" uri = "http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<title>view Student</title>
</head>
<body>
<table >
<c:forEach items="${students}" var="student">
<tr>
<td><c:out value="${student.roll_no}"></c:out></td>
</tr>
</c:forEach>
</table>
</body>
</html>