W3C home > Mailing lists > Public > ietf-http-wg-old@w3.org > January to April 2001

Re: Problem with multipart/x-mixed replace

From: Carl Kugler <kugler@us.ibm.com>
Date: Fri, 6 Apr 2001 14:51:44 -0600
To: "Seema P Kumar" <2kseema@sun20.datamatics.com>
Cc: http-wg@cuckoo.hpl.hp.com
Message-ID: <OF982B43A7.2C05AEEA-ON87256A26.0071BA66@LocalDomain>

I think you will find that IE does not support  "multipart/x-mixed-replace"
despite its claim of "User-Agent:  Mozilla/4.0 (compatible..."

You might try asking over on www-talk (see
http://lists.w3.org/Archives/Public/www-talk/).

     -Carl



                                                                                                                    
                    "Seema P Kumar"                                                                                 
                    <2kseema@sun20.datam       To:     <http-wg@cuckoo.hpl.hp.com>                                  
                    atics.com>                 cc:                                                                  
                                               Subject:     Problem with multipart/x-mixed replace                  
                    03/30/2001 04:41 AM                                                                             
                                                                                                                    
                                                                                                                    





Hi all !

 Could anybody tell me about the  "multipart/x-mixed-replace" content type
?
 I try to use thie content  type for my HTTPServletResponse object in my
Java servlet, to  keep
 outputting messages to
 the browser, but however, the  browser does not interpret the headers
 properly and all the tags are  visible as
 part of the browser content (I use Internet Explorer  5.0).

The following is the Java code :
public class RefreshingServlet extends  HttpServlet{


 public void init(ServletConfig config)  throws  ServletException{
  super.init(config);

 }

public void service(HttpServletRequest req,  HttpServletResponse res)
    throws ServletException,  IOException
{
     res.setContentType("multipart/x-mixed-replace;boundary=\"boundary\"");

  PrintWriter out=res.getWriter();
    // Here  is the first part
     out.print("\n\r--boundary\n\r");
    out.print("Content-Type:  text/html\n\r");

     out.println("<H1>Waiting...</H1>");
     out.flush();

    // Here is the long work (here,  a sleep)
    try
          Thread.sleep(3000);
    }
    catch  (Exception e) {
         //  ignore
    }

    // Here is the second  part
     out.print("\n\r--boundary\n\r");
    out.print("Content-Type:  text/html\n\r");

     out.println("<H1>Done</H1>");

     out.print("\n\r--boundary--\n\r");
     out.flush();
}

}

Any loopholes for this ?

Regards,
Seema Kumar
Datamatics Technologies  Ltd.,
(Tel: 8290829 (Ext:619))
Received on Friday, 6 April 2001 21:53:10 EDT

This archive was generated by hypermail pre-2.1.9 : Wednesday, 24 September 2003 06:33:42 EDT