my dog learned polymorphism
The moose likes JSP and the fly likes How to refresh a JSP page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "How to refresh a JSP page" Watch "How to refresh a JSP page" New topic

How to refresh a JSP page

deepesh shah

Joined: Feb 04, 2002
Posts: 15
Hi all,
i am facing a typical problem, see it is something like when i request a page when the page load somtimes i found repeatation of form componenets like more than one combo or table inspite of proper code because of multiple processing of the request and it turns out horrible all the images and other component shatters around the page, so can anyone help me out stopping this to happen. well if there is any code in JSP or javascript that can help out to load a refresh page, pls send me. i think it has something to do with flushing the out.print pls help me out.
thanx in adv..

Sandeep. Oza
Ranch Hand

Joined: Feb 04, 2002
Posts: 66
May be you have something cache problem. Try foll. snippet.
<%response.setIntHeader("max-age", 0); //IE only;
response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
response.setHeader("Pragma", "no-cache"); //HTTP 1.0
response.setIntHeader ("Expires", -1); //prevents caching at the proxy server
response.addHeader("cache-Control", "private"); //IE5.x only;

Yes, Everything Is Possible
I agree. Here's the link:
subject: How to refresh a JSP page
It's not a secret anymore!