Package io.ktor.server.servlet

Types

Link copied to clipboard
open class AsyncServletApplicationCall(application: Application, servletRequest: HttpServletRequest, servletResponse: HttpServletResponse, engineContext: CoroutineContext, userContext: CoroutineContext, upgrade: ServletUpgrade, parentCoroutineContext: CoroutineContext, managedByEngineHeaders: Set<String>) : BaseApplicationCall, CoroutineScope
Link copied to clipboard
class AsyncServletApplicationRequest(call: ApplicationCall, servletRequest: HttpServletRequest, coroutineContext: CoroutineContext) : ServletApplicationRequest, CoroutineScope
Link copied to clipboard
open class AsyncServletApplicationResponse(call: AsyncServletApplicationCall, servletRequest: HttpServletRequest, servletResponse: HttpServletResponse, engineContext: CoroutineContext, userContext: CoroutineContext, servletUpgradeImpl: ServletUpgrade, coroutineContext: CoroutineContext, managedByEngineHeaders: Set<String>) : ServletApplicationResponse, CoroutineScope
Link copied to clipboard
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.

Link copied to clipboard
abstract class KtorServlet : HttpServlet, CoroutineScope

A base class for servlet engine implementations

Link copied to clipboard
open class ServletApplicationEngine : KtorServlet

This servlet need to be installed into a servlet container

Link copied to clipboard
abstract class ServletApplicationRequest(call: ApplicationCall, servletRequest: HttpServletRequest) : BaseApplicationRequest
Link copied to clipboard
class ServletApplicationRequestCookies(servletRequest: HttpServletRequest, request: ApplicationRequest) : RequestCookies
Link copied to clipboard
class ServletApplicationRequestHeaders(servletRequest: HttpServletRequest) : Headers
Link copied to clipboard
abstract class ServletApplicationResponse(call: ApplicationCall, servletResponse: HttpServletResponse, managedByEngineHeaders: Set<String>) : BaseApplicationResponse
Link copied to clipboard
interface ServletUpgrade

Servlet upgrade processing

Link copied to clipboard
class ServletUpgradeHandler : HttpUpgradeHandler, CoroutineScope
Link copied to clipboard
class UpgradeRequest(response: HttpServletResponse, upgradeMessage: OutgoingContent.ProtocolUpgrade, engineContext: CoroutineContext, userContext: CoroutineContext, disableAsyncInput: Boolean)
Link copied to clipboard
class WebResourcesConfig constructor

Web resources serve configuration

Functions

Link copied to clipboard
fun ApplicationCall.putServletAttributes(request: ServletRequest)
Link copied to clipboard
fun Route.webResources(subPath: String = "/", configure: WebResourcesConfig.() -> 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.

Properties

Link copied to clipboard
val ApplicationRequest.javaSecurityPrincipal: Principal?

Returns Java's JAAS Principal

Link copied to clipboard
val ServletContextAttribute: AttributeKey<ServletContext>

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

Link copied to clipboard
val ApplicationRequest.servletRequestAttributes: Map<String, Any>

Provides javax.servlet request attributes or fail it the underlying engine is not servlet-backed.