i m facing a problem in building an application in jsp. the case is that i m creating a shopping cart in jsp and for each user i need to keep track of details.After selecting the items for each user i have a report which gives the details of that user.and a logout button clicking on which it removes the elements from the list.and also it is forwarded to home page and in home page we have 2 links naming user and administrator. the work of the user is that when a user will click the user link it will show the details of each user.but the problem is that when we click on the logout button the elements are removed from the list.so that we are not able to keep track of each user's information. how can i solve the problem? and how can i distinguish user's information from each other.? plz help me
I'm not 100% sure I follow you but here's a shot. Are you using a database backend or persistent storage of any kind? For starters, to track a user temporarily you can use a cookie or a session. You could also have the server monitor all users activity and record to its own private log. Regardless of how you are monitoring users, if you want the data to persist after a user has logged out, you must send the data to a storage mechanism at some point while the user is still logged in.
Are you familiar with setting up a database and use it to save orders/reports? It used to be items like shopping cards were rarely saved in a database but these day many sites like Amazon or NewEgg, save all data including shopping carts so that users logging on to multiple computers can always view their currently saved items. [ February 04, 2006: Message edited by: Scott Selikoff ]