I am creating an example online store, where the shopping cart is stored as a session object, and item beans are added to it each time a user adds an item to his cart.
If I want to access the session in a
jsp, I can do
and then do operations such as
This is not a problem. However, I want to write these values to a database when the order is submitted but I don't know how to access the session object in a bean. I think what I want is the equivelent of "jsp:useBean", but am unsure how to do this.
I am using
struts, so I need to access the session object, and iterate through each bean within it, adding their data to the DB.
Hope that's clear
Any help would be much apprieciated