I have a simple servlet where I am setting an attribute and when I try to get the same in JSP, I am getting the static content and not the dynamic data in JSP page.
Servlet
....
request.setAttribute("auditLog",auditLogs.get(1));
RequestDispatcher rd = request.getRequestDispatcher("index.jsp");
rd.forward(request, response);
JSP
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<body>
<h2>Enter user's email here</h2>
<form action="getUserData">
<input type="email" name="email"/>
<input type = "submit" value="Submit"/>
</form>
<br>
The audit logs here
${auditLog}
${auditLog.getAuditLogId()}
<c:out value="${auditLog}"/>
</body>
</html>
OUTPUT