I have created a servlet which creates and populates the values of a bean and also sets the bean as a session attribute and passes it to the jsp file. But when I retrieve the bean using the session object, I get null value. The jsp has been designed in such a way that the items from the database are saved in the bean file and passed to the jsp file which displays the database/bean values. This is in the doPost() method of the servlet:
//Adding the list bean to the session
session.setAttribute("list", list);
This is in the jsp file:
<%
MessageList list = (MessageList) request.getAttribute("list");
//The bean is of type 'MessageList'
%>