Eric Hodel wrote:
> On Mar 9, 2007, at 14:08, Aaron Smith wrote:
>> 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.

I figured it out actually:

  server = WEBrick::HTTPServer.new(
    :Port  => OPTIONS[:port],
    :DocumentRoot  => OPTIONS[:working_dir],
    :ServerType => OPTIONS[:server_type],
    :BindAddress => OPTIONS[:ip]
  )


server type is either WEBrick::Daemon of WEBrick::SimpleServer

-- 
Posted via http://www.ruby-forum.com/.