SpringBootMockServletContext

MockServletContext implementation for Spring Boot. Respects well-known Spring Boot resource locations and uses an empty directory for "/" if no locations can be found.

Author

Phillip Webb

Since

1.4.0

Constructors

Link copied to clipboard
constructor(resourceBasePath: String)
constructor(resourceBasePath: String, resourceLoader: ResourceLoader)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var majorVersion: Int
Link copied to clipboard
open var minorVersion: Int
Link copied to clipboard
val ORDERED_LIBS: String = "jakarta.servlet.context.orderedLibs"
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val sessionCookieConfig: SessionCookieConfig
Link copied to clipboard
Link copied to clipboard
val TEMPDIR: String = "jakarta.servlet.context.tempdir"

Functions

Link copied to clipboard
open fun addFilter(filterName: String, className: String): FilterRegistration.Dynamic
Link copied to clipboard
open fun addFilterRegistration(registration: FilterRegistration)
Link copied to clipboard
open fun addInitParameter(name: String, value: String)
Link copied to clipboard
open fun addJspFile(servletName: String, jspFile: String): ServletRegistration.Dynamic
Link copied to clipboard
open fun addListener(listenerClass: Class<out EventListener>)
Link copied to clipboard
open fun addMimeType(fileExtension: String, mimeType: MediaType)
Link copied to clipboard
open fun addServlet(servletName: String, className: String): ServletRegistration.Dynamic
Link copied to clipboard
open fun <T : Filter?> createFilter(c: Class<T>): T
Link copied to clipboard
open fun <T : EventListener?> createListener(c: Class<T>): T
Link copied to clipboard
open fun <T : Servlet?> createServlet(c: Class<T>): T
Link copied to clipboard
open fun declareRoles(roleNames: Array<String>)
Link copied to clipboard
open fun getAttribute(name: String): Any
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getContext(contextPath: String): ServletContext
Link copied to clipboard
open fun getDefaultSessionTrackingModes(): Set<SessionTrackingMode>
Link copied to clipboard
open fun getEffectiveSessionTrackingModes(): Set<SessionTrackingMode>
Link copied to clipboard
open fun getFilterRegistration(filterName: String): FilterRegistration
Link copied to clipboard
open fun getFilterRegistrations(): Map<String, out FilterRegistration>
Link copied to clipboard
open fun getInitParameter(name: String): String
Link copied to clipboard
Link copied to clipboard
open fun getJspConfigDescriptor(): JspConfigDescriptor
Link copied to clipboard
open fun getMimeType(filePath: String): String
Link copied to clipboard
open fun getNamedDispatcher(path: String): RequestDispatcher
Link copied to clipboard
open fun getRealPath(path: String): String
Link copied to clipboard
open fun getRequestDispatcher(path: String): RequestDispatcher
Link copied to clipboard
open fun getResource(path: String): URL
Link copied to clipboard
Link copied to clipboard
open fun getResourcePaths(path: String): Set<String>
Link copied to clipboard
open fun getServerInfo(): String
Link copied to clipboard
open fun getServletRegistration(servletName: String): ServletRegistration
Link copied to clipboard
open fun getServletRegistrations(): Map<String, out ServletRegistration>
Link copied to clipboard
Link copied to clipboard
open fun log(message: String)
Link copied to clipboard
open fun registerContext(contextPath: String, context: ServletContext)
Link copied to clipboard
open fun registerNamedDispatcher(name: String, requestDispatcher: RequestDispatcher)
Link copied to clipboard
open fun removeAttribute(name: String)
Link copied to clipboard
open fun setAttribute(name: String, value: Any)
Link copied to clipboard
open fun setInitParameter(name: String, value: String): Boolean
Link copied to clipboard
open fun setSessionTrackingModes(sessionTrackingModes: Set<SessionTrackingMode>)
Link copied to clipboard