Skip to content


== [[UIRootFromServletContext]] UIRootFromServletContext

UIRootFromServletContext manages the current <> object in a Jetty ContextHandler.

[[attribute]] UIRootFromServletContext uses its canonical name for the context attribute that is used to <> or <> the current[UIRoot] object (in Jetty's ContextHandler).

NOTE:[ContextHandler] is the environment for multiple Jetty Handlers, e.g. URI context path, class loader, static resource base.

In essence, UIRootFromServletContext is simply a "bridge" between two worlds, Spark's[UIRoot] and Jetty's ContextHandler.

=== [[setUiRoot]] setUiRoot Method

[source, scala]

setUiRoot(contextHandler: ContextHandler, uiRoot: UIRoot): Unit


NOTE: setUiRoot is used exclusively when ApiRootResource is requested to[register /api/* context handler].

=== [[getUiRoot]] getUiRoot Method

[source, scala]

getUiRoot(context: ServletContext): UIRoot


NOTE: getUiRoot is used exclusively when ApiRequestContext is requested for the current[UIRoot].

Last update: 2020-10-06