Automatically Refreshing a JSP

By: Emiley J. Emailed: 1676 times Printed: 2156 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 )
What are the different scopes in JSP?
JSP Example to connect to MS SQL database and retrieve records
Sending Email using JSP
JSP CheckBox Example
JSP Program for display Date
Comparison operators in JSP
Arithmetic Evaluation Using the Expression Language in JSP
Syntax For JSP Declaratives
Tags using in jsp
Basic Servlet Structure
Calling JSP from a batch file
Using a DataSource from WebLogic in a JSP
IIS and Tomcat - how to configure to work together
JSP Alert Example
Click to Activate and Use this control
Most Emailed Articles (in JSP)
Textarea Object
Click to Activate and Use this control
The Servlet Life Cycle
A JSP page that gets properties from a bean
The JSP Program running first Time.
Embedding java codes in jsp sciptlets
Debugging Servlets
Document Object
Password Object
What is JSP?
A Servlet That Generates HTML
The Advantages of JSP
Retrieving a Portion of a String
Working with Status Bar Messages
NotifyUtil::java.net.ConnectException: Connection refused: connect