Abhijeet
Abhijeet

Reputation: 11

Auto refreshing a jsp page not working

I have jsp page which loads data from ArrayList passed by the corresponding servlet. i have response.setIntheader("Refresh",60) which is suppose to refresh my jsp page after every 60 seconds. but this does not happen. it shows a blank page with servlet url in the browser.

Upvotes: 0

Views: 890

Answers (2)

Jramesh1967
Jramesh1967

Reputation: 31

  1. Did you wait for 60 seconds?
  2. Maybe getting overwritten after your call .. "If the header had already been set, the new value overwrites the previous one. "
  3. Maybe you are setting the header too late, after the response has been committed in which case you should be encountering IllegalStateException.

Upvotes: 1

user2575725
user2575725

Reputation:

If you want to refresh your jsp completely, you may try this in your jsp itself:

<meta http-equiv="refresh" content="60"/><!-- content is in seconds -->

Upvotes: 0

Related Questions