This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Originally posted by SriLatha: Hi prasanth, try like this to create a new session HttpSession hs=request.getSession(true); Integer i=(Integer)hs.getAttribute("ctrl");
Note that request.getSession(true) doesn't always create a new session. It will only create a new session if one doesn't already exist. If one already exists then the old one will be used.
Question for Prasad: Why do you want to always make a new session? If you don't want the data to be shared between requests by the same user you should store the data in the Request scope rather than the Session scope.