Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



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

Have Programming Question? Ask it here!
 
 
 


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


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


Advertisement
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:
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
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
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 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
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
JSP Tutorials - Page 3
JSP Tutorials - Page 3
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
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 3:Create a web page (userloginmid.jsp) to retieve...; Step 1: Create a web page(sign.jsp) to show a button to Login user. <
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
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
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
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
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
Bangla web page - JSP-Servlet
Bangla web page   what is the process to make a bangla web page in jee
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
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 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
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
how to design a jsp page via link which will expire after 3 days if not use?
how to design a jsp page via link which will expire after 3 days if not use?   Link is in a mail and if changes occur it will update in database
how to design a jsp page via link which will expire after 3 days if not use?
how to design a jsp page via link which will expire after 3 days if not use?   Link is in a mail and if changes occur it will update in database
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
Web 3
be personalize according to users? desire as every picture, every video clip, every
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
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
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
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
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
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
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
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     
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?   
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
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
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
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>
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
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
validating username and password in servlet and redirect to login page with error message if not valid
validating username and password in servlet and redirect to login page with error message if not valid  hi i want to validate my login page username and password in my servlet against database and if not valid want to display
admin login control page - JSP-Servlet
; </form> </body></html>adminPageAction.jsp<%@ page
 

 

 

DMCA.com