instance method WEBrick::HTTPServer#mount
mount(dir, servlet, *options) -> ()
-
サーバ上のディレクトリ dir にサーブレット servlet を対応させます。
- [PARAM] dir:
- ディレクトリをあらわす文字列を指定します。
- [PARAM] servlet:
- WEBrick::HTTPServlet::AbstractServlet のサブクラスのインスタンスを指定します。
- [PARAM] options:
- サーブレットのコンストラクタの引数を指定します。
include WEBrick srv = HTTPServer.new( { :BindAddress => '127.0.0.1', :Port => 10080 } ) srv.mount('/img', WEBrick::HTTPServlet::FileHandler, '/home/username/images')
class WEBrick::HTTPServer