tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <spr...@gmx.eu>
Subject RE: APR and async request
Date Tue, 21 Dec 2010 15:09:46 GMT
I mean the new servlet 3.0 capabilities:

startAsync() and the resulting AsyncContext:

request.startAsync()
AsyncContext#getResponse()

sample:

HttpServletResponse res = (HttpServletResponse)ac.getResponse();
res.setStatus(200);
res.setHeader("X-Foo", "bar");
res.setContentType("application/xml");
PrintWriter w = res.getWriter();
w.println("<foo/>");
w.flush();
ac.complete();

It seem that the response object is some what damaged, the code does not
fail, but the client only receives status 200, no body and no custom headers
send via Response#setHeader("X-...", ...).

Thank you!

> -----Original Message-----
> From: Mark Thomas [mailto:markt@apache.org] 
> Sent: Dienstag, 21. Dezember 2010 14:10
> To: Tomcat Users List
> Subject: Re: APR and async request
> 
> On 21/12/2010 13:07, spring@gmx.eu wrote:
> > OK; I've got it...
> > 
> > when I change the Connector from HTTP/1.1 to
> > org.apache.coyote.http11.Http11NioProtocol is works.
> > Sounds a bit logical (Non-Blocking and async) but can someone please
> > explain?
> 
> You'll need to explain what you mean by async requests before 
> anyone can
> answer that.
> 
> Mark
> 
> > 
> > Thank you
> > 
> > 
> >> when I disable APR by removing the tcnative-1.dll or by 
> removing the APR
> >> listener from server.xml async requests do not work anymore. I get
> >> immediately after the request an empty response body with 
> status 200.
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message