Index: [Article Count Order] [Thread]

Date:  Fri, 5 Apr 2002 18:19:47 -0500
From:  Brad Cox <bcox@virtualschool.edu>
Subject:  [webricken:90] "Right" way to send data to browser?
To:  webricken@notwork.org
Message-Id:  <p05101502b8d3df827cb8@[192.168.1.2]>
In-Reply-To:  <p05101501b8d3a88097ae@[192.168.1.2]>
References:    <Pine.LNX.4.33.0204050019360.21171-100000@fangora.fourthcrusade.com> <p05101501b8d3a88097ae@[192.168.1.2]>
X-Mail-Count: 00090

Does webricken provide a way to incrementally add to the response 
output, other than += which seems wasteful?

class HelloServlet < HTTPServlet::AbstractServlet
   def do_GET(req, res)
     res.body = "<HTML>hello, world.</HTML>"
     res['Content-Type'] = "text/html"
   end
end

I'm hoping for something along these lines but don't see it anywhere.
	res.put("<h1>Header</h1>")
	res.put("<p>blah, blah</p>")
	res.put("<p>and so forth</p>")

-- 
Brad Cox, PhD; bcox@virtualschool.edu 703 361 4751
o For industrial age goods there were checks and credit cards.
    For everything else there is http://virtualschool.edu/mybank
o Java Interactive Learning Environment http://virtualschool.edu/jile
o Java Web Application Architecture: http://virtualschool.edu/jwaa