File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Redirect hint pls.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Redirect hint pls.." Watch "Redirect hint pls.." New topic

Redirect hint pls..

Pranit Saha
Ranch Hand

Joined: Sep 09, 2001
Posts: 130
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..
Sarath Mohan
Ranch Hand

Joined: Mar 17, 2001
Posts: 213
try this respose.setHeader("Refresh", "<time in seconds>; <file-name>");

Sarath Mohan
Rohit Ahuja
Ranch Hand

Joined: Oct 04, 2001
Posts: 121
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

Face Off.
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
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=")
SCJP for the Java� 2 Platform

So much trouble in the world -- Bob Marley
Rohit Ahuja
Ranch Hand

Joined: Oct 04, 2001
Posts: 121
Thanx Bosun,thats what i wanted. Bingo
I agree. Here's the link:
subject: Redirect hint pls..
jQuery in Action, 3rd edition