ERBHandler evaluates an ERB file and returns the result. This handler is automatically used if there are .rhtml files in a directory served by the FileHandler.

ERBHandler supports GET and POST methods.

The ERB file is evaluated with the local variables servlet_request and servlet_response which are a WEBrick::HTTPRequest and WEBrick::HTTPResponse respectively.

Example .rhtml file:

Request to <%= servlet_request.request_uri %>

Query params <%= servlet_request.query.inspect %>
Class Methods

Creates a new ERBHandler on server that will evaluate and serve the ERB file name

Instance Methods

Handles GET requests

An alias for do_GET

Evaluates erb providing servlet_request and servlet_response as local variables.