If you use,
<% response.addHeader("Refresh","4;account.jsp"); %>
in jsp page, the page will be redirected to account.jsp from the current page after 4 seconds.
Note: The above operation would happen in all browsers except internet explorer and eclipse internal browser.
To Perform Auto Refresh in all browsers:
<%String autoRefresh="accounts.jsp" %> <meta http-equiv="refresh" content="5;URL=<%=(autoRefresh)%>" />
Now After 5 seconds page will be refreshed and redirected to accounts.jsp in all browsers including internet explorer and eclipse internal browser.
Note: Use http-equiv=”refresh” rather than “Content-Type”.
Thanks for reading this post…………!!!
509 total views, 2 views today