my dog learned polymorphism
The moose likes JSP and the fly likes jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "jsp" Watch "jsp" New topic


biswajit ray
Ranch Hand

Joined: Nov 30, 2005
Posts: 30
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 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
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3753

Ah, posts in the "JSP" forum titled "jsp"...

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 ]

[OCA 8 Book] [Blog]
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
A hint for future posts :Use A Meaningful Subject Line.
I agree. Here's the link:
subject: jsp
It's not a secret anymore!