This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
How to make a redirection from the current page (response.write of servlet) to a different servlet after a fixed time has elapsed? I am not supposed to use meta tag. May be i can use a timer for implementing this. But no samples are avilable with a timer used within servlet code. Hope I am clear to the willing responder. Rgds Muthu
What about using the setHeader method of the response object. For example, the following will load google's home page after 10 seconds. response.setHeader("Refresh", "10; URL=http://www.google.com") Just make the URL the location of your servlet and change the time to whatever you want. [ April 09, 2003: Message edited by: Bosun Bello ]
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
I figured that was "off limits" since that's essentailly what the meta tag does... but I guess it'd all be up to how the assignment is worded. Good call, Bosun! bear
Joined: Sep 17, 2002
But will this not lead to a network roundtrip? In my case, luckily the "redirected" servlet is also in the same server as that of "redirecting" servlet. Is there any way I could use a RequestDispatcher with the functionality (timed redirection)? Rgds Muthu