Author:Brendon Upson
Email:
Subject:RE: Print Writer
Category:Development
Message:write(String s); -------- Inside the action you can write straight to the browser with the this.write(""); or this.writeln("Your string"); commands. The difference is that writeln() will append a CRLF to the output. setBuffer(byte buf[]); ---------------------- Alternatively you can set the return buffer by calling this.setBuffer(bufBytes), which is great for sending images etc to the browser (don't forget to set the content type though -this.setContentType("new/type");) streamToClient(byte buf[]); --------------------------- And finally, you can stream straight to the browser by calling this.streamToClient(bufBytes); Note that with this method you will have to set all the HTTP headers and replycode, as well as set the content. This gives you complete control over the response.

Threads:
Print Writer   Mike 16.Jan.04
    RE: Print Writer   Brendon Upson 17.Jan.04
        RE: Print Writer   Mike 17.Jan.04
            RE: Print Writer   Mike 17.Jan.04