tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Agnew <Se...@corp.netzero.net>
Subject getting server push to work
Date Mon, 29 Jan 2001 19:47:43 GMT

Iv'e not had any luck with server push and Tomcat. Flushing the PrintWriter
doesn't seem to be sending any data. The Browser only hangs until the
servlet is completely finished. How can I disable Tomcat from buffering
servlet output?

	
response.setContentType("multipart/x-mixed-replace;boundary=boundary");
		PrintWriter  out = response.getWriter();	
		String s = "Awaiting query results, please wait ...\n";
		out.println("--boundary");
		out.println("Content-Type: text/html\r");
		out.println("\r");
		out.println(s);
		out.println("\r");
		out.println("--boundary--");
		out.println("\r");
		out.flush();
		try {
		Thread.sleep(3000);
		} catch (Exception e) {
			out.println("interrupted: " + e);
		}

		out.println("Content-Type: text/html\r");
		out.println("\r");
		out.println("This is the end");
		out.println("--boundary--");
		out.flush();



__________________________________________ 
NetZero - Defenders of the Free World
Get your FREE Internet Access and Email at
http://www.netzero.net/download/index.html

Mime
View raw message