| Author |
Server side redirect (301) - JSP :: How to set time delay before page redirect using
|
Suresh Gopi
Ranch Hand
Joined: Mar 08, 2007
Posts: 49
|
|
Hello Friends, I want to show one page for 5 seconds and after that i want to redirect the page to another URL. Got the code snippet for 301 redirection in JSP . <% response.setStatus(301); response.setHeader( "Location", "http://www.new-url.com/" ); response.setHeader( "Connection", "close" ); %> Please let me know how to set the time delay. Is there any way to set the time delay using response.setHeader() method. Note: I checked the possible HTTP response headers but couldn't find one to acheive this. The above can be acheived using meta tag or script language but i want to do it in server side. Is it possible?
|
Regards<br />Suresh
|
 |
Seetharaman Venkatasamy
Ranch Hand
Joined: Jan 28, 2008
Posts: 5575
|
|
i am not sure,but what about Thread.sleep(1000) in server side ? correct me if i am wrong
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56542
|
|
Originally posted by seetharaman venkatasamy: i am not sure,but what about Thread.sleep(1000) in server side ? correct me if i am wrong 
Umm, no. Not a very good idea.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56542
|
|
|
Hint
|
 |
Bennet Xavier
Ranch Hand
Joined: Jun 19, 2008
Posts: 162
|
|
Hi Bear Bibeault, Thank You Very Much. its really superb information.
|
Thanks And Regards
Bennet Xavier. X
|
 |
Suresh Gopi
Ranch Hand
Joined: Mar 08, 2007
Posts: 49
|
|
|
Thanks a lot Bear Bibeault.
|
 |
Seetharaman Venkatasamy
Ranch Hand
Joined: Jan 28, 2008
Posts: 5575
|
|
Thanks a lot Bear
|
 |
 |
|
|
subject: Server side redirect (301) - JSP :: How to set time delay before page redirect using
|
|
|