immutant.web documentation

Associate one or more Ring handlers with your application, mounted
at unique context paths

current-servlet-request

(current-servlet-request)
Returns the currently active HttpServletRequest. This will only
return a value within an active ring handler. Standard ring handlers
should never need to access this value.

start

macro

(start handler)(start handler options)(start path handler options)
Starts a Ring handler that will be called when requests
are received on the given sub-context-path. If no sub-context-path
is given, "/" is assumed.

The options are a subset of those for ring-server [default]:
  :init          function called after handler is initialized [nil]
  :destroy       function called after handler is stopped [nil]
  :stacktraces?  display stacktraces when exception is thrown [true in :dev]
  :auto-reload?  automatically reload source files [true in :dev]
  :reload-paths  seq of src-paths to reload on change [dirs on classpath]

start-handler

(start-handler sub-context-path handler & {:as opts})
Typically not called directly; use start instead

start-servlet

(start-servlet sub-context-path servlet)
Can be used to mount a servlet in lieu of a typical Ring handler

stop

(stop)(stop sub-context-path)
Stops the Ring handler or servlet mounted at the given sub-context-path.
If no sub-context-path is given, "/" is assumed.