Package io.ktor.server.servlet

Types

AsyncServletApplicationCall

open class AsyncServletApplicationCall : 
    BaseApplicationCall,
    CoroutineScope

AsyncServletApplicationRequest

class AsyncServletApplicationRequest : 
    ServletApplicationRequest,
    CoroutineScope

AsyncServletApplicationResponse

open class AsyncServletApplicationResponse : 
    ServletApplicationResponse,
    CoroutineScope

DefaultServletUpgrade

object DefaultServletUpgrade : ServletUpgrade

The default servlet upgrade implementation using Servlet API. Please note that some servlet containers may not support it or it may be broken.

KtorServlet

abstract class KtorServlet : HttpServlet, CoroutineScope

A base class for servlet engine implementations

ServletApplicationEngine

open class ServletApplicationEngine : KtorServlet

This servlet need to be installed into a servlet container

ServletApplicationRequest

abstract class ServletApplicationRequest : 
    BaseApplicationRequest

ServletApplicationRequestCookies

class ServletApplicationRequestCookies : RequestCookies

ServletApplicationRequestHeaders

class ServletApplicationRequestHeaders : Headers

ServletApplicationResponse

abstract class ServletApplicationResponse : 
    BaseApplicationResponse

ServletUpgrade

interface ServletUpgrade

Servlet upgrade processing

ServletUpgradeHandler

class ServletUpgradeHandler : 
    HttpUpgradeHandler,
    CoroutineScope

UpgradeRequest

class UpgradeRequest

WebResourcesConfig

class WebResourcesConfig

Web resources serve configuration

Properties

ServletContextAttribute

val ServletContextAttribute: AttributeKey<ServletContext>

Attribute that is added by ktor servlet to application attributes to hold ServletContext instance.

javaSecurityPrincipal

val ApplicationRequest.javaSecurityPrincipal: Principal?

Returns Java’s JAAS Principal

Functions

webResources

fun Route.webResources(
    subPath: String = "/",
    configure: WebResourcesConfig.() -> Unit = {}
): Unit

Serve web resources (usually a directory named webapp containing WEB-INF/web.xml). Note that WEB-INF directory itself is not served by default.