dcsimg
session validate is not working in internet explorer , but working with other browsers why!!!!!!
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   ali_alsoumahi
Posted On:   Monday, August 9, 2010 03:52 AM

Hi experts, I have a click button called log off , here once a user clicks it , task goes to logout servlet to end current user session . below is my code , I don't know why it works fine with mozilla firefox and google chrom but not working with internet explorer. please help me I did many tries till got headache response.setHeader("Cache-Control","no-store"); //HTTP 1.1 response.setHeader("Pragma","no-cache"); //HTTP 1.0 response.setDateHeader ("Expires", 0); HttpSession httpSession = request.getSession(); httpSession.setAttribute("validUser",null); httpSession.invalidate(); HttpSession session = request.getSession(false); if(   More>>

Hi experts, I have a click button called log off , here once a user clicks it , task goes to logout servlet to end current user session . below is my code , I don't know why it works fine with mozilla firefox and google chrom but not working with internet explorer. please help me I did many tries till got headache

response.setHeader("Cache-Control","no-store"); //HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0
response.setDateHeader ("Expires", 0);

HttpSession httpSession = request.getSession();
httpSession.setAttribute("validUser",null);
httpSession.invalidate();

HttpSession session = request.getSession(false);
if(session == null)
response.sendRedirect("/index.jsp");
else
response.sendRedirect("http://www.google.com");//just to //test

here it goes fine to my index, but if I logged in again, I should enter a new session , but unfortunately this not happened in explorer , works fine with mozilla , and chroom.

I have also done in my index.jsp the check like below:

<%
if(session!=null){
session.setAttribute("validUser",null);
session.invalidate();

%>
just to erase whatever previous session . But why session exist on same page !!!!!!!!!!!!!! only in explorer , it makes me open new explorer for new user and that is what I don't want !!!!!!

   <<Less
About | Sitemap | Contact