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
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
Deepak A
Ranch Hand

Joined: Oct 04, 2001
Posts: 120
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: 1506
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
Deepak A
Ranch Hand

Joined: Oct 04, 2001
Posts: 120
Thanx Bosun,thats what i wanted. Bingo
I agree. Here's the link:
subject: Redirect hint pls..
Similar Threads
JSTL - collection in request vs. session
forward request url from server side
JSP Forward
output redirect??
How to show recent blogs in my webpage