> From: banto [mailto:banto...@gmail.com]
> Subject: set-cookie
> 
> Now the code is something like:
> 
> public class FrontController extends HttpServlet {
> 
>       public void init() throws ServletException {
> 
>               HashMap products = new HashMap();
>               Product p = new Product(1, "Dog", "9.99");
>               products.put("1", p);
>               //  Store products in the ServletContext
>               getServletContext().setAttribute("products", products);
>       }
>       public void doPost(HttpServletRequest request,
> HttpServletResponse
> response)
>                       .....

It's the code in the doXxx() methods that needs examination, not the init() 
method.  Do you have any JSPs?  IIRC, these will automatically create a session 
unless explicitly disabled.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

Reply via email to