To better maintain all the data, I am opting not
having alot of session variables but instead maintain
one object that will contain all data needed and store
that in a session.  For example, instead of having
session.setAttribute("product", product),
session.setAttribute("web_preference", webPreference),
etc. just create an object like this which can then be
stored in a session:

public class UserContainer{
    private Product product;
    private WebPreference webPreference;

    public Product getProduct () {
        return product;
    }

    public void setProduct(Product newProduct){
        product= newProduct;
    }
}

and in the jsp page have something like this

<% UserContainer userContainer = (UserContainer)
session.getAttribute(Constants.USER_CONTAINER_KEY); %>

Do you guys do something similar or any other
recommendations?

Jade


        

        
                
__________________________________________________________ 
Find your next car at http://autos.yahoo.ca

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to