Servlets share their instances among many clients. So using instance field is bad to store personal information. Is it better to use session attributes as instance fields in servlets?
So session.setAttribute("totalPrice", 50)
instead of private int totalPrice = 50