From: Eric Hodel Date: 2007-03-18T10:14:00+09:00 Subject: Re: WEBrick::Daemon and WEBrick On Mar 9, 2007, at 14:08, Aaron Smith wrote: > Is it possible to use the WEBrick::Daemon with > WEBrick::AbstractServlet. > Here is what i'm running for the basic servlet: > > dir = Dir::pwd > server = WEBrick::HTTPServer.new( > :Port => port, > :DocumentRoot => dir > end > > server.mount "/gateway", RUBYAMF::WEBrickServlet > trap "INT" do server.shutdown end > server.start > > I've seen an example saying you have to subclass the HTTPServer and > just > run the WEBrick::Daemon.start when initializing. But can this be done > with servlets? Servlets run in a server, so daemonize after you've started the HTTPServer and mounted your servlets.