Automatically Refreshing a JSP

By: Emiley J. Emailed: 1598 times Printed: 2051 times    

Latest comments
By: rohit kumar - how this program is work
By: Kirti - Hi..thx for the hadoop in
By: Spijker - I have altered the code a
By: ali mohammed - why we use the java in ne
By: ali mohammed - why we use the java in ne
By: mizhelle - when I exported the data
By: raul - no output as well, i'm ge
By: Rajesh - thanx very much...
By: Suindu De - Suppose we are executing

The following scriptlet code adds a Refresh header that specifies a 60-second interval for refreshing the JSP. Place this code at the top of the JSP before any content appears:

<% response.addHeader("Refresh","60"); %>

If you want to refresh the JSP to another web component or page, use this syntax:

<% response.addHeader("Refresh","10;
  http://localhost:8080/home/thanks.jsp"); %>

JSP Home | All JSP Tutorials | Latest JSP Tutorials

Sponsored Links

If this tutorial doesn't answer your question, or you have a specific question, just ask an expert here. Post your question to get a direct answer.



Bookmark and Share

Comments(5)


1. View Comment

it is good

View Tutorial          By: kamal at 2009-11-01 19:58:54
2. View Comment

Its working ,,, gud stuff.

View Tutorial          By: Atul at 2011-07-21 10:34:44
3. View Comment

thx a lot

View Tutorial          By: lupita at 2013-09-04 18:58:40
4. View Comment

Yesu. Thenk a u vely muchos. HURRRRR

View Tutorial          By: hurr durr at 2013-09-19 19:50:23
5. View Comment

Gives a syntax error

View Tutorial          By: Siddharth at 2015-06-10 05:15:00

Your name (required):


Your email(required, will not be shown to the public):


Your sites URL (optional):


Your comments:



More Tutorials by Emiley J.
Error generating R.java from manifest
ERROR 1251: Client does not support authentication protocol requested by server; consider upgrading MySQL client
IIS and Tomcat - how to configure to work together
PHP Warning: Unknown(): Unable to load dynamic library '/usr/local/php4/lib/php/extensions/no-debug ......
Adding your own Application icon for your J2ME application (jar file)
Creating Menus in Code using VB.net
Traversing all files in a directory using Ruby
Using Proxy to connect to URLs in Ruby
POST a form in Ruby
Reading URL content using Ruby (HTTP)
dRuby client/server mode sample program
Benchmark module in Ruby
encoding and decoding in Ruby using Base64 Module
Module Abbrev in Ruby
Standard Library Packages in Ruby

More Tutorials in JSP
LifecycleException: service.getName(): "Catalina"; Protocol handler start failed: `java.net.BindException: Permission denied <null>:80
JSP Alert Example
JSP CheckBox Example
Uploading an Image to a Database using JSP
Uploading a file to a server using JSP
A JSP page that gets properties from a bean
The page Directive in JSP
The taglib, tag, include, attribute and the variable Directive in JSP
Declarations in JSP
Scriptlets and Expressions in JSP
Tag Libraries in JSP
The Request Object in JSP
The Response Object in JSP
The Out Object in JSP
The Session Object in JSP

More Latest News
Most Viewed Articles (in JSP )
JSP Example to connect to MS SQL database and retrieve records
JSP Program for display Date
Sessions in JSP
An Example Using Servlet Initialization and Page Modification Dates
NetworkClient
Closing Windows
Retrieving a Portion of a String
Enabling Expression Language Evaluation in JSP
The TryCatchFinally Interface in JSP
Steps to get a Free SSL certificate for your Tomcat
Automatically Refreshing a JSP
Getting Started with JSP
Declarations in JSP
Uploading a file to a server using JSP
JSP CheckBox Example
Most Emailed Articles (in JSP)
The Advantages of JSP
What are the different scopes in JSP?
Document Object
Enable/Disable Scripting Elements in JSP
A JSP page that gets properties from a bean
Embedding java codes in jsp sciptlets
A Servlet That Generates HTML
The Application Object in JSP
Server Side Programming
Syntax For JSP Declaratives
Form processing in JSP
Sessions in JSP
Debugging Servlets
Packaging Servlets
The Advantages of Servlets Over “Traditional” CGI