Servlet page to refresh the page every 3 mibutes

Servlet page to refresh the page every 3 mibutes

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

View Answers

February 25, 2008 at 12:57 AM

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









Related Tutorials/Questions & Answers:
Servlet refresh page
Servlet refresh page In this example we will show you how you can refresh your page from setting the refresh attribute from a servlet. response.setHeader... the browser to refresh the page after 10 seconds. In this will you can develop
page refresh - JSP-Servlet
up window has to close and jsp page has to refresh. how can i solve...page refresh  Hi All, I've done a login application using Ajax. I wrote jsp page having sign in option. when i click the sign in,pop up window
Advertisements
Click on Page Refresh - JSP-Servlet
Click on Page Refresh  hi ,i am working on jsp with mysql. i m facing a problem whenever i click on page refresh or f5 button, the value on form... then you redirect this page to another page. 2)Second alternative is to set
servelt refresh page
servelt refresh page   write a program in servlet that display the cricket score.the page should automatically refresh on every 5 seconds.the score... should fall down.the page should not refresh after 5 overs is completed
Refresh a Web Page Using In Servlet
example we develop an application to Refresh a web Page using Servlet. We... refresh the page after every 10 seconds. ADS_TO_REPLACE_2... .style1 { font-weight: bold; } Refresh a Web Page Using
Part refresh without a page refresh
Part refresh without a page refresh  hello, How do I submit a form or a part of a form without a page refresh?   hii,ADS_TO_REPLACE_1... interaction over the whole page
refresh jsp page - Ajax
refresh jsp page  Code for refresh a web page in jsp.  Hi friend, function refreshpage() { window.location.reload
Page Refresh - Struts
Page Refresh   Hi How Can we control the page does not go to refersh after its forward again from action class.in my form i have one dropdownlist... in same page and fwd the action to same page
how to refresh my GUI page
how to refresh my GUI page  how to refresh a GUI in java
How to prevent the page refresh while submitting the form??
How to prevent the page refresh while submitting the form??  Hi... to the select of Dropdown1. Im hitting a db for this every time.Hence the page loads every time when changing Dropdown1. Is there any way in JAVA SCRIPT to prevent
JSP Tutorials - Page 3
JSP Tutorials - Page 3
Page is not getting loaded when I refresh the webpage???
Page is not getting loaded when I refresh the webpage???  **I am... getting header section always but page is not getting loaded after the header section when I refresh the page.* Note: Header section is getting loaded always Could
How To Page Refresh Using JavaScript In JSP
How To Page Refresh Using JavaScript In JSP....   Step 1: Create a web page(sign.jsp) to show a button to Login user. ADS_TO_REPLACE_2 <%@ page import="java.sql.*" %>
retrive data from data base and print it in every page until logout
retrive data from data base and print it in every page until logout  ... after completion of login he goto home page.inside home page i want to print the USER NAME through retriving from database.suppose from home page he go to next
jsp page - JSP-Servlet
jsp page  what are elemets and template data in jsp page??  ... the embedded Java declaration statements to be inserted into the Servlet class... as part of the service method of the Servlet class. There are two ways to write
refresh - JSP-Servlet
. Is there any other way to refresh that particular place instead of refreshing whole page... JSP project. In home page i like to logged members count dynamically... the whole page instead of refreshing the particular page. Logged member's
include a delete option in every row of table in a JSP page
include a delete option in every row of table in a JSP page  I have the following code of a JSP page........... <blockquote> <p>... the change on the page..............also if the user clicks on edit then he can
Page object - JSP-Servlet
Page object  Hello friends, How can we make use of PAGE object of implicit JSP object. If this is possible explain me about it's methods. I did not find any methods or explanation of this object. Pls help me
Java : Servlet Tutorials - Page 2
;15") refreshes the servlet after every 15 seconds till the servlet gets...; Servlet Tutorials Pages: Servlet Tutorials Page 1 | Servlet Tutorials Page 2
Calling a jsp page from Servlet
Calling a jsp page from Servlet  How can I do this? Suppose I have jsp page aaa.jsp. From aaa.jsp on form action I have made a call to a servlet... List and data is being retrieve. Now I want to pass this List to another jsp page
Sorting a jsp page. - JSP-Servlet
Sorting a jsp page.  Hi there, It's me again. I tried to use Ajax... is process the code in the servlet. Here's the code in the jsp below: JSP Page Universal Books Home Page
Bangla web page - JSP-Servlet
Bangla web page   what is the process to make a bangla web page in jee
export jsp page - JSP-Servlet
export jsp page  i want to export jsp page in word and pdf format... code that export my jsp page in word and pfd format....  Hi Friend, Try the following code: 1)pdf.jsp: Name Address Contact
JSP error page - JSP-Servlet
JSP error page  Hi i have 1000 of JSP. but we coded it without adding the . but now i have to forward the page to the specific page when the exception occured in JSP. is there any short cut i can do? do not want to add this line
jsp page tags - JSP-Servlet
jsp page tags  Hi, Can anyone please explain me how to use Pager tags (http://jsptags.com/tags/navigation/pager/index.jsp). After getting the data from the database, how should we use that in these tags. Can you please
JSP Hindi Page - JSP-Servlet
JSP Hindi Page  I need to provide users with option to print a Certificate in English or Hindi. This is an html page generated by JSP Code. Depending upon the button clicked english or hindi version of the Certificate should
web page altering while displaying servlet response
web page altering while displaying servlet response  in my application one index.jsp and one servlet is there and the servlet contains some db code and i want to display response of that servlet in a div in my index.jsp
Version of com.aoindustries>ao-web-page-servlet dependency
List of Version of com.aoindustries>ao-web-page-servlet dependency
multiple dropdowns in single page - JSP-Servlet
multiple dropdowns in single page  i have a jsp page having drop down... the below servlet my jsp Untitled Document...; servlet for view public class ViewAdminPendingRequests
jsp dropdown refresh - JSP-Servlet
but the probleam during data extraction when i select first drop down its refresh then 2nd drop down it also refresh. so i cannot get the selected data. Please kindly give
Captcha Refresh - Jquery
Captcha Refresh - Jquery  I'm looking for an example to refresh the Captcha image in Jquery ..every time the page get refresh. Thanks.   $("#refresh").click(function() { $("#captcha").attr("src","captcha.php?r
jsp page authentication panel using jsp/servlet?
jsp page authentication panel using jsp/servlet?  I have 10 jsp jsp forms and 7 users and i want to grant variour permission like edit,delete and save for users dynamically on forms.So please refer me code
Maven Dependency ao-web-page-servlet >> 1.1
You should include the dependency code given in this page to add Maven Dependency of com.aoindustries >> ao-web-page-servlet version1.1 in your project
Maven Dependency ao-web-page-servlet >> 1.0
You should include the dependency code given in this page to add Maven Dependency of com.aoindustries >> ao-web-page-servlet version1.0 in your project
How to pass parametes from JSP page to HTML page? - JSP-Servlet
How to pass parametes from JSP page to HTML page?  Hi all, In my project I have one JSP page and one HTML page. In JSP page I have created HTML... with the username in HTML which I have called in JSP page. So I just want
staying in same page after deliting arow in jsp page - JSP-Servlet
staying in same page after deliting arow in jsp page  Hello Sir, I want to stay back in current jsp page after deleting row in jsp table. how can i do this. need help from you. thanks, nandini  Hi friend
jsp drop down without refresh - JSP-Servlet
jsp dropdown in jsp page,But the probleam is when i select first drop down its totaly reload the page and selected item is vanish, Similirally when i used 2nd... refresh and what change's is made in jsp of javascript to make proper data
Parameter passing from jsp page to jsp page - JSP-Servlet
Parameter passing from jsp page to jsp page  Hi I intends to pass the parameters that I received from previous page through query String. I get all parameter in respective string variables. I have to passed the parameters
Fetching database field from servlet to jsp page ?
Fetching database field from servlet to jsp page ?  Hello Java... field. I wanted to pass some of the database field from servlet to jsp... (i am opening my database in servlet init() method ) how to pass rs.getString(8
how to execute the below servlet with html page
how to execute the below servlet with html page  //vallidate user n...; <servlet-name>validservlet</servlet-name> <servlet-class>active.validservlet</servlet-class> <init-param> <param-name>
Client side refresh
by all browsers. <META HTTP-EQUIV="Refresh" CONTENT="5; URL=/servlet/MyServlet/"> This will refresh the page in the browser automatically and loads...Client side refresh  What is client side refresh?   
Servlet Interview Questions - Page 2
Servlet Interview Questions - Page 2   ... of Servlet? Answer: The interface javax.servlet.Servlet,  defines the three life... the lifecycle of the Servlet. When a new request come to a Servlet, the container
title and keywords don't refresh in webpage - JSP-Servlet
title and keywords don't refresh in webpage  Hi, I changed the title and keywords on my main jsp page that is the entry point into my web... and keywords. If I change anything else on the jsp page it refreshes
embedding a chatting code in jsp page - JSP-Servlet
embedding a chatting code in jsp page  i need to know that how can i embed my chatting code in java networking in my jsp page
regarding-update the Jsp page itself - JSP-Servlet
regarding-update the Jsp page itself   Joined: Aug 17, 2009 Messages: 12 [Post New]posted Today 10:39:52 PM Quote Edit [Up] I have two Jsp... is i want to update the information on same Jsp page. How can I implement
how to generate captcha in jsp page ? - JSP-Servlet
how to generate captcha in jsp page ?  hi friends, i would like to implement Captcha in login screen. i'm unsing struts. could you please give some sample codes to implement this. Thank you Ganesh  Hi, This link
Unable to run the jsp page - JSP-Servlet
page is shipping and billing details and the next page is payment details. What... on the textbox of the payment.jsp page and also calculate the tax payment and shipping... on the Net payment text box in the payment.jsp page. And these total amount and shipping
write Div in jsp page - JSP-Servlet
write Div in jsp page  How can i write Div class in jsp page?  Hi Viral Sonawala tag is a html tag, perform the same function in jsp as used in html. Example: This is a header This is a paragraph
admin login control page - JSP-Servlet
; </form> </body></html>adminPageAction.jsp<%@ page
Maven Repository/Dependency: com.aoindustries | ao-web-page-servlet
-page-servlet. Latest version of com.aoindustries:ao-web-page-servlet... Aug 2016 3 1.0 07 Aug 2016 You can... to create Maven Web Application in Eclipse? Maven 3 Tutorial Convert

Ads