Programming Tutorials

Automatically Refreshing a JSP

By: Emiley J. in JSP Tutorials on 2008-11-24  

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"); %>





Add Comment

* Required information
1000

Comments

No comments yet. Be the first!

Most Viewed Articles (in JSP )

Latest Articles (in JSP)