java - Handling multiple HttpSession across multiple browsers on same system -
with below code, trying handle session. code working fine when tried transaction multiple tab means allowing 1 tab transation. if other tab in same browser opened error.jsp shown. code not able allow transaction when other instance of browser opened. brower maintains cache hence same sessionid provided.
if(session!=null && url.equalsignorecase("/abc/domepayrequest")){ //check if session not new , entry request throw error system.out.println("session id: "+httpreq.getsession().getid()); ((httpservletresponse) response).sendredirect("errduplicatesession.jsp"); } if(session == null){ //if session new & check if entry request if(url.contains("abc")){ //create new session session=httpreq.getsession(false); }else{ //else throw session related error system.out.println("session expired error"); } }
what can done transaction can done if new instance of browser opened.
any suggestion appreciated
Comments
Post a Comment