Automatically Refreshing a JSP

By: Emiley J. Emailed: 1677 times Printed: 2157 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 CheckBox Example
Comparison operators in JSP
JSP Example to connect to MS SQL database and retrieve records
What are the different scopes in JSP?
JSP Alert Example
Uploading an Image to a Database using JSP
JSP Program for display Date
Sending Email using JSP
Writing your first JSP page
An Example Using Servlet Initialization and Page Modification Dates
The Tag Life Cycle with Attributes in JSP
The BodyTag Interface in JSP
Automatically Refreshing a JSP
The Request Object in JSP
The Response Object in JSP
Most Emailed Articles (in JSP)
Textarea Object
Click to Activate and Use this control
JSP Example to connect to MS SQL database and retrieve records
Document Object
What is JSP?
Debugging Servlets
The Servlet Life Cycle
Frame Object
NotifyUtil::java.net.ConnectException: Connection refused: connect
The page Directive in JSP
A JSP page that gets properties from a bean
Uploading an Image to a Database using JSP
The JSP Program running first Time.
Embedding java codes in jsp sciptlets
Sessions in JSP