I am developing a shopping cart using servlets, have two servlets :
1. ShopingCart.java
2. TotalAmount.java

In ShopingCart.java i have created sessions and synchronise them using

```
synchronized(session)  // lock session protect this from multiple threads
      {
       TotalAmount cart = (TotalAmount)session.getAttribute("Cart");

       if(cart == null)  // new sesssion, just create a cart
       {
        cart = new TotalAmount();
        session.setAttribute("Cart", cart);
       }
      // I have to call cart.display();

```

and my display method in TotalAmount.java contains (request,response) as parameters.
so, how can i pass the request and response to display method?

yes, i need request and response parameters in display method to save some variable data in session in TotalAmount.java 

Please Help..