session problems.....
Hoi all,
I've been working on this shopping cart thing for a while now and I finally got it working this morning?.once
I use a list to store the objects the user has selected to buy, and I place the list in the user session scope
here is the funny thing every now and again it works sometimes the cart gives me a null pointer exception and sometimes it works.
what am I doing wrong, I place the list in the user session scope when he/she clicks on the open shop button, which opens an action class that forwards to a JSP that displays the shop items in a dynamically created table.
this is how I place the array list in the session scope:
if(request.getSession().isNew())
{
shpCart =new ArrayList();
request.getSession().setAttribute("shpCart",shpCart);
}
am I doing it right?
Or is there some thing I抦 missing here?
Thanks in advance

