Hi I am doing the following in my SampleServlet.java
//Fill resultset from db
.....
try {
ArrayList Rows = new ArrayList();
while (resultSet.next()){
ArrayList row = new ArrayList();
for (int i = 1; i <= 7 ; i++){
row.add(resultSet.getString(i));
}
Rows.add(row);
}
request.setAttribute("propertyList", Rows);
RequestDispatcher requestDispatcher = getServletContext().getRequestDispatcher("/DisplayProperties.jsp");
requestDispatcher.forward(request,response);
and then in my jsp DisplayPropeties.jsp i have
<%
ArrayList rows = new ArrayList();
if (request.getSession().getAttribute("propertyList") != null) {
rows = (ArrayList ) request.getSession().getAttribute("propertyList");
}
%>
but rows is allways null.
Can anyone help with what I am doing wrong please.