Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Having problems in sessions

 
Anil Verghese
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hii,

I am doing a shopping cart application... I have given an option to browse through the whole records and also an option to select. I placed all the selected items in a vector in the Action class.. then set it as a session. The control goes to a jsp page where the selected items are displayed.

the problem starts here if i select back it goes back to the browse page and if i reselect anything else and click next instead of displaying the new values the old ones are displayed.....

Need help!!!
 
Kaustabh Singha Roy
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As I cant see the actual code I can only guess. As it appears the problem is in the way the list is handled in the session. Once you go back and edit the selected items the list need to be carefully edited in the session. I suggest that instead of keeping the list directly in the session keep a value object there, and make the list of items a member of it. You can then define flexible operation to the list as the methods of the class. It would also enable you to keep other informations too at a common class.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic