ktor-server-servlet / io.ktor.server.servlet / ServletApplicationEngine

ServletApplicationEngine

open class ServletApplicationEngine : KtorServlet

This servlet need to be installed into a servlet container

Constructors

<init>

ServletApplicationEngine()

This servlet need to be installed into a servlet container

Properties

application

open val application: Application

Current application instance. Could be lazy

coroutineContext

open val coroutineContext: <ERROR CLASS>

enginePipeline

open val enginePipeline: EnginePipeline

Engine pipeline

logger

open val logger: Logger

Application logger

upgrade

open val upgrade: ServletUpgrade

Servlet upgrade implementation

Functions

destroy

open fun destroy(): Unit

Called by servlet container when the application is going to be undeployed or stopped.

init

open fun init(): Unit

Called by the servlet container when loading the servlet (on load)

Inherited Functions

service

open fun service(request: HttpServletRequest, response: HttpServletResponse): Unit

Called by the servlet container when an HTTP request received.

Companion Object Properties

ApplicationEngineEnvironmentAttributeKey

const val ApplicationEngineEnvironmentAttributeKey: String

An application engine environment instance key. It is not recommended to use unless you are writing your own servlet application engine implementation

ApplicationEnginePipelineAttributeKey

const val ApplicationEnginePipelineAttributeKey: String

An application engine pipeline instance key. It is not recommended to use unless you are writing your own servlet application engine implementation