Thank you very much Jay - I will try it out ;) <br><br><div><span class="gmail_quote">On 4/2/07, <b class="gmail_sendername">Jay McCarthy</b> <<a href="mailto:jay.mccarthy@gmail.com">jay.mccarthy@gmail.com</a>> wrote:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Here is a simple one:<br><br>(require (lib "servlet-sig.ss" "web-server")
<br> (lib "unit.ss"))<br><br>(unit<br> (import servlet^)<br> (export)<br><br> (send/finish<br> (make-html-response/incremental<br> (lambda (output-chunk)<br> (output-chunk "<html><head><title>"
<br> "my-title</title></head>\n")<br> (output-chunk "<body><p>The first paragraph</p>\n")<br> (sleep 4)<br> (output-chunk "<p>The second paragraph</p></body></html>\n")))))
<br><br>On 3/28/07, Yin-So Chen <<a href="mailto:yinso.chen@gmail.com">yinso.chen@gmail.com</a>> wrote:<br>> Thanks - I will give it a try. I couldn't find an example on how the<br>> function (gen output) is written - would you happen to have an example?
<br>><br>> Thanks,<br>> yinso<br>><br>><br>> On 3/28/07, Jay McCarthy <<a href="mailto:jay.mccarthy@gmail.com">jay.mccarthy@gmail.com</a>> wrote:<br>> > Not directly, but perhaps make-response/incremental is what you need.
<br>> ><br>> ><br>> <a href="http://download.plt-scheme.org/doc/360/html/web-server/web-server-Z-H-12.html#node_sec_10.1.3">http://download.plt-scheme.org/doc/360/html/web-server/web-server-Z-H-12.html#node_sec_10.1.3
</a><br>> ><br>> > Jay<br>> ><br>> > On 3/27/07, Yin-So Chen <<a href="mailto:yinso.chen@gmail.com">yinso.chen@gmail.com</a>> wrote:<br>> > > Hi -<br>> > ><br>> > > how can I access the output-port within a servlet? The scenario is when
<br>> I<br>> > > have a large file that shouldn't be held in memory but better accessed<br>> via a<br>> > > pipe between input and output port. As far as I can tell the request<br>> object<br>
> > > doesn't take a port for body content. Let me know if I missed anything,<br>> > > thanks.<br>> > ><br>> > > yinso<br>> > ><br>> > > --<br>> > > <a href="http://www.yinsochen.com">
http://www.yinsochen.com</a><br>> > > ...continuous learning...<br>> > > _________________________________________________<br>> > > For list-related administrative tasks:<br>> > > <a href="http://list.cs.brown.edu/mailman/listinfo/plt-scheme">
http://list.cs.brown.edu/mailman/listinfo/plt-scheme</a><br>> > ><br>> > ><br>> ><br>> ><br>> > --<br>> > Jay McCarthy < <a href="mailto:jay.mccarthy@gmail.com">jay.mccarthy@gmail.com
</a>><br>> > <a href="http://jay.teammccarthy.org">http://jay.teammccarthy.org</a><br>> ><br>><br>><br>><br>> --<br>><br>> <a href="http://www.yinsochen.com">http://www.yinsochen.com</a><br>
> ...continuous learning...<br><br><br>--<br>Jay McCarthy <<a href="mailto:jay.mccarthy@gmail.com">jay.mccarthy@gmail.com</a>><br><a href="http://jay.teammccarthy.org">http://jay.teammccarthy.org</a><br></blockquote>
</div><br><br clear="all"><br>-- <br><a href="http://www.yinsochen.com">http://www.yinsochen.com</a><br>...continuous learning...