Index: [Article Count Order] [Thread]

Date:  Wed, 13 Mar 2002 10:05:18 +0900
From:  "NAKAMURA, Hiroshi" <nahi@keynauts.com>
Subject:  [webricken:35] Re: ERB
To:  <webricken@notwork.org>
Message-Id:  <000301c1ca2b$247cd5d0$85222fc0@sarion.co.jp>
In-Reply-To:  <3C8E6D72.7030102@imperitek.com>
X-Mail-Count: 00035

Hi, David,

At first, thank you for information about Apache-Tomca
 integration in [webricken:33].  I'm wondering how it
sounded to authors. :)

> From: David Corbin [mailto:dcorbin@imperitek.com] 
> Sent: Wednesday, March 13, 2002 6:05 AM

> >>I'd like to request that webrick not automatically attempt to 
> >>load ERB. 
> >>
> >
> >Why don't you create your own httpservlet.rb
> >which does not requires 'webrick/httpservlet/erbhandler'?
> >Seeing webrick/httpservlet.rb, you may want to remove
> >some other handlers.  Does your application which uses
> >WEBrick as a toolkit really needs those handlers?
> >
> Do you mean modify it, or create another one?  I tried the 
> latter, and 
> that didn't seem to work.  I still get the "cannot load 
> `erb/erbl'" message.

To say the truth, I've not tried it yet (sorry).
I mean the latter, but it requires rather complicated
procedure.

1. Create 'webrick' directory at the directory where your
   httpd.rb located.
2. Copy original httpservlet.rb to
   '$(httpd.rb dir)/webrick/httpservlet.rb' and modify it.
3. Add these lines AT THE HEAD OF your httpd.rb
     $.:unshift( '.' )
     require 'webrick/httpservlet'

Then your httpd.rb will load your httpservlet.rb and will
ignore "require 'webrick/httpservlet'" line in
webrick/httpserver.rb.

Hmm.  Authors, is there easy way to let webrick/httpserver.rb
load my customized httpservlet.rb?

Regards,
// NaHi