File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Handling Browser refresh" Watch "Handling Browser refresh" New topic

Handling Browser refresh

sunilkumar pal

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
}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.

I agree. Here's the link:
subject: Handling Browser refresh
It's not a secret anymore!