Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Redirect hint pls..

 
Pranit Saha
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
we have response.sendRedirect("filename") to redirect..
but how can we fix a time that the page will be redirected after the specified time..
Thanks in advance..
Pranit..
 
Sarath Mohan
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
try this respose.setHeader("Refresh", "<time in seconds>; <file-name>");
Cheers
Binu
 
Rohit Ahuja
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Array binu,
this is not what i want, this is refreshing time and again. i want it to push it to a page after ten seconds and stay on that page,just like rediff.com
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It should have redirected you and stayed at teh URl after the specified time.
The following directs a client to google after 30 seconds...
response.setHeader("Refresh", "30; URL=http://www.google.com")
------------------
Bosun
SCJP for the Java� 2 Platform
 
Rohit Ahuja
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx Bosun,thats what i wanted. Bingo
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic