This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes Handling Browser refresh Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Handling Browser refresh" Watch "Handling Browser refresh" New topic
Author

Handling Browser refresh

sunilkumar pal
Greenhorn

Joined: Jun 12, 2008
Posts: 4
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Handling Browser refresh
 
Similar Threads
[WAS 7] java.io.IOException when file uploading with IE 8, works on FireFox 6
Cookies not getting stored in IE6 and IE7 when running in environment resembling production
Handling refresh browser using request.getHeader("Accept")
Sending request headers manually
HTTP Protocol & Servlets