- From: Anselm Baird_Smith <Anselm.Baird_Smith@sophia.inria.fr>
- Date: Tue, 5 Aug 1997 07:58:59 +0200 (MET DST)
- To: mark@intraspect.com
- Cc: www-jigsaw@w3.org
Mark Friedman writes: > Anselm Baird_Smith wrote: > > > Also, instead of client.getOutputStream, you should rather > > use request.getOutputStream, and set your reply status code to > > HTTP.DONE (that's a trick to tell the Jigsaw engine that you have > > generated the output) > > > > Could you explain a little more about this trick? What exactly does > Jigsaw do differently with this than what it would do with > client.getOutputStream() and/or using HTTP.OK as the reply status? Hi Mark, The w3c.jigsaw.http.Client class is the one doing that trick. If you look at the emitReply method, you'll see that if the reply it has to emit has a HTTP.DONE status, it will do nothing (emit no bytes: no headers, and no body). The goal of the trick is to allow for resources to "do the whole job": In case of a servlet, the model is that the servlet developper has to write everything himself (the reply headers & body). When such a model is used, the Jigsaw engine (which usually does this emitting) has to do nothing. Now if you look into w3c.jigsaw.http.Reply:getOutputStream, you'll see that it automatically set its own status to HTTP.DONE. For a sample usage of all that you may want to look at the servlet support implementation. Anselm.
Received on Tuesday, 5 August 1997 01:59:09 UTC