🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.lenguajes.java
Article #16986

SERVLETS

#16986
From: Antonio Ruiz Martínez
Date: Wed, 13 Dec 2000 10:31
33 lines
1950 bytes
Hola!!
    Tengo un servlet que es el siguiente:

public void doPost(HttpServletRequest request, HttpServletResponse
response)throws IOException, ServletException{

response.setContentLength(bytes.size());
ByteArrayOutputStream bytes=new ByteArrayOutputStream(1024);
PrintWriter out=new PrintWriter(bytes,true);
out.println(stringOne);
out.println(stringTwo);
out.flush();
bytes.writeTo(response.getOutputStream());
//Esta primera parte quiero que llegue inmediatamente al cliente
//Sin embargo, al meter el while que viene despu�s no env�a los datos.
while(condition) {
    //Aqu� puede estar esperando alrededor de un minuto...
}
out.println(strThree);
out.println(new String(inBuf));
bytes.writeTo(response.getOutputStream());
}

Pues eso, que al meter el while no llegan los datos inmediatamente, como
lo puedo solucionar?

Muchas gracias por adelantado, me har�as un gran favor si me ayud�is.

Saludos,
Antonio
--
Antonio Ruiz Mart�nez
http://arm.esinter.net
Technical Details
Message-ID: <3A375018.D7100960@dif.um.es>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news-x.support.nl!newsfeeds.belnet.be!naxos.belnet.be!news.belnet.be!news.rediris.es!news.um.es!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: 1116f3,6f4f213c39668c65,start
X-Google-Attributes: gid1116f3,public
X-Google-ArrivalTime: 2000-12-14 01:22:35 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news-x.support.nl!newsfeeds.belnet.be!naxos.belnet.be!news.belnet.be!news.rediris.es!news.um.es!not-for-mail
From: Antonio Ruiz Martínez <arm@dif.um.es>
Newsgroups: es.comp.lenguajes.java
Subject: SERVLETS
Date: Wed, 13 Dec 2000 11:31:52 +0100
Organization: Universidad de Murcia
Lines: 35
Message-ID: <3A375018.D7100960@dif.um.es>
NNTP-Posting-Host: micropeich.dif.um.es
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: unida.um.es 976703229 12244 155.54.210.44 (13 Dec 2000 10:27:09 GMT)
X-Complaints-To: usenet@news.um.es
NNTP-Posting-Date: 13 Dec 2000 10:27:09 GMT
X-Mailer: Mozilla 4.7 [en] (WinNT; I)
X-Accept-Language: en