This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am making a small online bookstore and am using a Stateful Session for the shopping cart. The problem is that when I an item to the cart my other items vanish. I take it that I am creating another instance of the bean and not accessing the old one since I am using "cart=home.create()". Is there a way to find the old bean? Thanks
Try saving the cart session bean's handle in your JSP or servlet session context. First time in, when you go to lookup the handle, it will be null, because you haven't saved one yet, so you find the home interface and do a create() and save the created bean's handle. Subsequently, all you have to do is get the bean from the handle.
An IDE is no substitute for an Intelligent Developer.