JettyDsl

object JettyDsl

Provides a Kotlin DSL for constructing and configuring Jetty Server and ServletContextHandler instances.

Functions

Link copied to clipboard
fun server(port: Int, block: Server.() -> Unit = {}): Server

Creates and configures a Jetty Server listening on port on every interface.

fun server(port: Int, host: String?, block: Server.() -> Unit = {}): Server

Creates and configures a Jetty Server with one ServerConnector listening on port at host.

Link copied to clipboard
fun servletContextHandler(block: ServletContextHandler.() -> Unit = {}): ServletContextHandler

Creates and configures a ServletContextHandler.