I have a
servlet that needs to set and attribute that will be retrieved by a
JSP.
Originally my servlet code to do that was:
getServletContext().setAttribute("passedItem",passedItemObj);
the JSP had the following code:
getServletContext().getAttribute("passedItem"); the code worked except for the fact that all sessions retreived the same values. I then modified the code in the servlet to look like the following:
request.setAttribute("passedItem",passedItemObj);
and changed the JSP code to look like the following:
request.getAttribute("passedItem"); Now I return null values.
I tried to change the servlet to use:
session.setAttribute("passedItem",passedItemObj); and the JSP to
session.getAttribute("passedItem"); and I still return nulls.
Any suggestions???