Hi,

I have arrived late in the conversation so hopefully I will not sound
rude by changing the topic back to the original question: How to
display a busy page to a HTML client?

I have had some sucess with multipart mixed replace mime. This works
with Netscape, Mozilla and the Firefox browsers. Unfortunately it
doesn't work with IE6. Does anyone have much experience with this part
of multipart mime and IE?

See below for code sample:

package doran;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class InProgress extends HttpServlet {

        public void doGet(HttpServletRequest request, HttpServletResponse response)
                throws ServletException, IOException {
                        response.setHeader("MIME-Version","1.0");
                        response.setContentType("multipart/x-mixed-replace;
boundary=\"--boundary\"");
                        ServletOutputStream out = response.getOutputStream();

                        out.println("----boundary");
                        out.println("Content-Type: text/html");
                        out.println();
                        out.println("<html><head><title>In progress</title></head>");
                        out.println("<body><h1><bl>Awaiting query results, please wait
...</bl><h1></body></html>");
                        out.flush();
                        try {
                        Thread.sleep(3000);
                        } catch (Exception e) {
                                out.println("interrupted: " + e);
                        }

                        out.println("----boundary");
                        out.println("Content-Type: text/html");
                        out.println();
                        out.println("<html><head><title>Completed!</title></head>");
                        out.println("<body><h2>This is the end</h2></body></html>");
                        out.println("----boundary");
                        out.flush();
        }
}



<SNIP all the quoted stuff>


--
Doran Kangwai

___________________________________________________________________________
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

Reply via email to