Date: Mon, 18 Mar 2002 18:07:46 -0500 From: David Corbin <dcorbin@imperitek.com> Subject: [webricken:52] Re: RequestDispatcher (patch) To: webricken@notwork.org Message-Id: <3C967342.6040204@imperitek.com> References: <000b01c1ce75$b56fe7f0$85222fc0@sarion.co.jp> X-Mail-Count: 00052> > >If you made changes to some files; > cd originalDir > diff -upr . ../modifiedDir > ../patch.txt > I never can remember those flags. Attached you will find 1) a patch 2) requestdispatcher.rb (for inclusion in the distribution) 3) Some RubyUnit tests I wrote. HttpTestCase.rb is a base class for the other two. Do with them as you wish. The patch does the following: a) enables RequestDispatcher to support include/forward. There is probably much more than can be done here, like providing support for POST on the forward. I'm also sure that there are better ways to manage the response(s), but I think this will cover the 80% case. b) request attributes - I modeled this on java servlets, but there is probably a more ruby-esque way to do this. It makes forward much more useful. c) I modified the "handler creation". For handlers that don't need instance data, I wanted to be able to instantiate one handler at the beginning, and have it reused- this is both an efficiency issue, and an issue of I want to "build" the handler using new() and other method calls, not by building a giant hash of options. But you can the old style handlers continue to work just fine.52_2.txt (attatchment)(tag is disabled)
52_3.txt (attatchment)(tag is disabled)
52_4.txt (attatchment)(tag is disabled)
52_5.txt (attatchment)(tag is disabled)
52_6.txt (attatchment)(tag is disabled)