Home Answers Viewqa Servlet-Interview-Questions Servlet page to refresh the page every 3 mibutes

 
 


ajay
Servlet page to refresh the page every 3 mibutes
1 Answer(s)      5 years and 3 months ago
Posted in : Servlet Interview Questions

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 Pages:
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...;   Step 2:Create a Servlet (timer.java) which refresh the page... .style1 { font-weight: bold; } Refresh a Web Page Using
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
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
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
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?   
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, Ajax can do... page
refresh jsp page - Ajax
refresh jsp page  Code for refresh a web page in jsp.  Hi friend, function refreshpage() { window.location.reload
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
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
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
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
JSP Tutorials - Page 3
JSP Tutorials - Page 3
Client Auto Refresh in Servlets
("Refresh", "15") refreshes the servlet after every 15 seconds till... seconds, page will get refresh. Output will be: Download Source Code...Client Auto Refresh in Servlets      
How To Page Refresh Using JavaScript In JSP
How To Page Refresh Using JavaScript In JSP...;   Step 3:Create a web page (userloginmid.jsp) to retieve...; Step 1: Create a web page(sign.jsp) to show a button to Login user. <
Web 3
be personalize according to users? desire as every picture, every video clip, every
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
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
Refresh code - Java Server Faces Questions
Refresh code  Hi All, In Drop Down Box i have 5 items if i select... method should i add. the page should refreshed and in that box only 5 items should... bombobox in servlet Dynamic Combobox List User Name
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
Refresh the form - Struts
Refresh the form  Hi How Can i control the page that doesn't go to refresh when i am doing 1 or more action from same page and forward those action again to same page. how can i control the doesn't go to refresh in that page
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
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... Java : Servlet Tutorials     
Table refresh with ajax - Ajax
Table refresh with ajax  Hi, I want to update my table which has... or if the database is updated, i want my table to be updated automatically. For this i think i need to use ajax where a particular area in the page can
PHP Variables from Page to Page
page.   3. $_SESSION[] The in-built $_SESSION[] function in php is also...PHP Variables from Page to Page A PHP programmer can easily pass the variables from one page to another page by using different method and functions provided
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
How to refresh Client only once by sending setHeader ("refresh" ,??? )
How to refresh Client only once by sending setHeader ("refresh" ,??? )  How can i send response from JSP that will make my client page to be refreshed ?? I just want to refresh my client page only once....! Not periodically
3 tier architecture in java - JSP-Servlet
3 tier architecture in java  H!, My shopping cart project... for login page, jsp used for validating the username,password and connecting... here that what are the 3 tiers. I tier is html ( it can also be jsp?) II tier
servlet - Servlet Interview Questions
Servlet page to refresh the page every 3 mibutes  How can i refresh... the following attribute on your html(jsp or servlet generated ) page to refresh the page every 3 mibutes<META HTTP-EQUIV="Refresh"CONTENT="
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
Common Interview Questions Page -3
Common Interview Questions Page -3       Question: 5. What experience do you have in this field... and can make the same in every new job. So, the salary range should reflect the value
Difficult Interview Questions Page -3
Difficult Interview Questions Page -3   ... like  everyone does but  every time I've taken a lesson from my faults... strong because each and  every fault give me the strength to confront them
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
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>
Java Programming: Chapter 3 Quiz Answers
Sample Quiz Answers For Chapter 3 THIS PAGE CONTAINS SAMPLE...; ...}". Question 3: What is the main difference between a while... the multiples of 3 from 3 to 36, that is: 3 6 9 12 15 18 21 24 27 30 33 36
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
How to set the pdfptable as pdf page header when generating the pdf from jsp page. - JSP-Servlet
How to set the pdfptable as pdf page header when generating the pdf from jsp page.  how to set the pdfptable column headers as a header of the documet.i need to display the column headers for every pdf page if pdf documt is 20
refreshing a jsp without flickering effect for every 5 seconds using ajax
refreshing a jsp without flickering effect for every 5 seconds using ajax  I want to refresh a jsp without flickering for every 5 seconds using...;1)ajax.jsp: <%@page import="java.sql.*"%> <META HTTP-EQUIV="Refresh
Common Interview Questions Page -2
Common Interview Questions Page -2       Question: 3. What's Your Biggest Weakness? Answer:    This is a typical and bit difficult question that every job
Cover Page
. Also not included are Java source code examples from Appendix 3
Bangla web page - JSP-Servlet
Bangla web page   what is the process to make a bangla web page in jee
Java: Method Exercises 3
Java: Method Exercises 3 Name: _________________________________ What... 2 3 4 5 6 7 8 9 10 11... // Date : 3 May 2005 import javax.swing.*; class MethodExercises3
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
Web Page
Web Page    Use any programming language or package to create a Project 2 .The Main menu should only be displayed, if the user is valid and uses..., and display the appropriate message as shown in Screen 2 and Screen 3. A log file
Admin Page
is that every time I have to use if(role= admin) {} else {} but I think

Ask Questions?

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.