Hi, My app. interacts with a payment gateway. I need to resume my older session once the transaction is over. Have achieved it by storing my session in a HashMap and putting the HashMap in application scope. Iam able to retrieve the same once the transaction is over. But the problem is whenever I call HtptpSession session = req.getsession();it creates a new session for me.Also similar problem in the jsps with <jsp:useBean> tag.Any suggestions wud be appreciated.Thanks.Cheenu.
There is a isNew() method in HttpSession that can be used to check if the session is new or old. The API says: Returns true if the client does not yet know about the session or if the client chooses not to join the session.
Maybe you could use this method. AFAIK request.getSession() always returns a new session.
Hope this helps.