This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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
Author

How to refresh a JSP page

deepesh shah
Greenhorn

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


deep
Sandeep. Oza
Ranch Hand

Joined: Feb 04, 2002
Posts: 66
Deepesh,
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.addHeader("Cache-Control","no-store");
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;
%>
S.Oza


Yes, Everything Is Possible
 
GeeCON Prague 2014
 
subject: How to refresh a JSP page