This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Handling Browser refresh

 
sunilkumar pal
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am using following code for refresh browser

if(request.getHeader("Accept").equals("*/*")){ request.getSession().invalidate();
try{ request.getRequestDispatcher
("/common/sessionExpired.jsp").forward(request,response);
}catch(Exception ex){ }

Its working good.
But problem is that in some system without refresh browser request.getHeader("Accept") return "*/*"
where as it should return "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*" wich is default

please help me for solve above problem .
How to set default header should come like this "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*"

is there any solution for handling refresh browser.

Thanks
Sunil
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic