Is it possible to have spring set objects from a http session on other objects ?

For example in a simple shoppingcart system I'd like to have an action with a method like this

setShoppingCart(Cart cart)

where cart is stored in the http session