
How can i refresh my Java Servlet page at time interval of three minutes?

Hi,
You can use the following attribute on your html(jsp or servlet generated ) page to refresh the page every 3 mibutes
<META HTTP-EQUIV="Refresh"
CONTENT="180; URL=http://www.yoursite.com/serlvet/">;
The contents of the "CONTENT" attribute consist of the number of seconds until the page load takes place, followed by a semicolon and a space, then "URL=" followed by the URL of the site to load. Note that the "URL=" part is within the "CONTENT=" parameter, not a separate parameter.
Since this is an HTTP-EQUIV META tag, it is actually equivalent to sending a Refresh header in the server's actual HTTP headers. If you have control of this server-level stuff, you can do refreshes directly through the headers without having to insert a tag in your HTML documents
I should note, however, that the Refresh header doesn't appear in any of the standards documents regarding the HTTP protocol, so it is technically nonstandard (whether sent as a real header or a META tag), though widely supported.
You can even use javascript to achieve the same thing
<script language=JavaScript>
function Refresher(t) {
if(t) refresh = setTimeout("document.location=? http://www.yoursite.com/serlvet/?;";, t*1000);
}
</script>
And I call the script inside the BODY tag:
<BODY onLoad="Refresher(20)">
Where the parameter is the amount of seconds that IE should wait until refresh.
I hope you find it useful.
Thanks
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.