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.....
Kaustabh Singha Roy
Joined: Oct 04, 2005
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.