Try this:
setHeader("Refresh","10; URL=http://www.yahoo.com");
this will be a universal solution.
sanjeev
-----Original Message-----
From: Veerendra Akula [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 01, 2002 8:34 PM
To: [EMAIL PROTECTED]
Subject: Status page from servlet.
Hi ,
I have a servlet which will stream "Please wait while loading" message
initially, Sleep for 10 secs and then finally being diverted to another
location(yahoo.com).
This servlet is working fine in IE5.5.When I try this in
Netscape4.73,Initially I am getting a blank page for 10 secs and for a split
second I see the message " Please wait while loading",finally being diverted
to yahoo.com.
Following is the servlet code.
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class ABTestStatusServlet extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse
response) throws IOException {
doPost(request,response);
}
public void doPost(HttpServletRequest request, HttpServletResponse
response) throws IOException {
try{
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("<html>");
out.println("<body>");
out.println("Please wait while loading.");
out.println("</body >");
for(int i=0; i<500;i++){
out.print(" ");
}
out.flush();
System.out.println("Sleeping for 10 seconds....");
Thread.sleep(10000);
System.out.println("Wokeup afteeer 10 seconds....");
out.println("<script>");
out.println(" function myscript(){ ");
out.println(" document.location=\"http://www.yahoo.com\"");
out.println(" }");
out.println("</script>");
out.println("<body onload=\"myscript()\">");
out.println("</body>");
out.println("</html>");
for(int i=0; i<500;i++){
out.print(" ");
}
out.flush();
out.close();
}catch(Exception e){}
}
}
Does any body has an Idea why this is not working in Netscape4.73.
Thanks
Veerendra..
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html