I've actually done some work on some extensions to webrick that implement
filters and request forwarding/including (similarly to java servlets). The code
is far from ready for prime-time, and has some bugs in it I have yet to work
out.
In addition, to get the hooks into webrick in the places I need, I had to
copy-paste some webrick methods and override them, with small changes to add
hooks, so my code isn't very future-proof when it comes to webrick updates.
That said, if you're still interested, I would be happy to mail you the code.
On Wed, Nov 09, 2005 at 01:50:53PM -0500, Steve Appling wrote:
> I'm new to Ruby, so apologies in advance if these are silly questions.
> I'll also issue the disclaimer that this was cross-posted to the
> ruby-talk list, but I haven't had any responses there.
>
> I'm working on a very small web application running under webrick (not
> as CGI). I would like to make use of the wealth of web related helpers
> in the CGI module (such as session management and multipart/form-data
> handling), but don't know how to get this to work inside a webrick
> servlet. Is this possible? Are there other web helper modules that can
> do similar tasks inside a servlet?
>
> Lastly, is there a way to implement any type of filters or a request
> forwarding mechanism within webrick?
>
--
Derek Lewis
===================================================================
Java Web-Application Developer
Email : email@lewisd.com
Cellular : 778.898.5825
Website : http://www.lewisd.com
"If you've got a 5000-line JSP page that has "all in one" support
for three input forms and four follow-up screens, all controlled
by "if" statements in scriptlets, well ... please don't show it
to me :-). Its almost dinner time, and I don't want to lose my
appetite :-)."
- Craig R. McClanahan