I'm trying to setup a JSP that gets information from a Servlet. I feel that I'm doing something really stupid but in my servlet I am using:
HttpSession session = hreq.getSession();
hreq.setAttribute("results", "hreq value");
session.setAttribute("results","This is the value.");
hreq.getRequestDispatcher("jsp.jsp").forward(hreq, hres);
I can't seem to pick up either of the set values in my JSP. I've tried using:
<% out.print(session.getAttribute("results"));%>
<c:out value='${results}' />
${results}
None of them seems to be retriving the value.
What am I doing wrong, because it's driving me up the wall?