This week's book giveaways are in the Scala and Android forums.
We're giving away four copies each of Machine Learning Systems: Designs that scale and Xamarin in Action: Creating native cross-platform mobile apps and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Redirect hint pls..  RSS feed

 
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..
 
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
 
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
 
Ranch Hand
Posts: 1512
  • 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
 
look! it's a bird! it's a plane! It's .... a teeny tiny ad
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!