java.lang.Object
cloud.piranha.core.impl.DefaultWebApplication
- All Implemented Interfaces:
WebApplication
,jakarta.servlet.ServletContext
- Direct Known Subclasses:
MicroWebApplication
,ServerWebApplication
The default WebApplication.
The filters
field is backed by a LinkedHashMap so we get an
insertion-order key set. If you change this, be aware that methods using this
field should be changed to account for that.
The servlets
field is backed by a LinkedHashMap so we get an
insertion-order key set. If you change this, be aware that methods using this
field should be changed to account for that.
- Author:
- Manfred Riem ([email protected])
-
Field Summary
Modifier and TypeFieldDescriptionStores the attributes.protected ClassLoader
Stores the class loader.protected final List<jakarta.servlet.ServletContextAttributeListener>
Stores the servlet context attribute listeners.protected final List<jakarta.servlet.ServletContextListener>
Stores the servlet context listeners that were not declared in web.xml, web-fragment.xml, or via annotationsprotected String
Stores the context path.protected final List<jakarta.servlet.ServletContextListener>
Stores the servlet context listeners that were declared in web.xml, web-fragment.xml, or via annotationsprotected jakarta.servlet.Servlet
Stores the default servlet (if any).protected boolean
Stores the boolean flag indicating if the web application is distributable.protected int
Stores the effective major version.protected int
Stores the effective minor version.protected static final int
Stores the ERROR constant.protected final Map<String,
DefaultFilterEnvironment> Stores the filters.protected static final int
Stores the INITIALIZED constant.protected static final int
Stores the INITIALIZED_DECLARED constant.protected final List<jakarta.servlet.ServletContainerInitializer>
Stores the servlet container initializers.Stores the init parameters.protected DefaultInvocationFinder
Stores the invocation finder, which finds a Servlet, Filter(chain) and variants thereof to invoke for a given request path.protected WebApplicationManager
Stores the web application manager.protected boolean
Stores the metadata complete flag.protected String
Stores the request character encoding.protected final List<jakarta.servlet.ServletRequestListener>
Stores the servlet request listeners.protected String
Stores the response character encoding.protected final Map<jakarta.servlet.ServletResponse,
jakarta.servlet.ServletRequest> Stores the active responses and the associated requests.protected static final int
Stores the SERVICING constant.protected String
Stores the servlet context name.protected final Map<String,
DefaultServletEnvironment> Stores the servlet environmentsprotected static final int
Stores the SETUP constant.protected Object
The source object where this web application instance originates from, i.e.protected int
Stores the status.protected boolean
When we're in tainted mode, we have to throw exceptions for a large number of methods.protected String
Stores the virtual server name.protected WebApplicationRequestMapper
Stores the web application request mapper.Fields inherited from interface jakarta.servlet.ServletContext
ORDERED_LIBS, TEMPDIR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionjakarta.servlet.FilterRegistration.Dynamic
jakarta.servlet.FilterRegistration.Dynamic
jakarta.servlet.FilterRegistration.Dynamic
addFilterMapping
(Set<jakarta.servlet.DispatcherType> dispatcherTypes, String filterName, boolean isMatchAfter, String... urlPatterns) Add a mapping for the given filter.void
addInitializer
(jakarta.servlet.ServletContainerInitializer servletContainerInitializer) Add a servlet container initializer.void
addInitializer
(String className) Add a servlet container initializer.jakarta.servlet.ServletRegistration.Dynamic
addJspFile
(String servletName, String jspFile) void
addListener
(Class<? extends EventListener> type) void
addListener
(String className) <T extends EventListener>
voidaddListener
(T listener) void
addResource
(Resource resource) Add the resource.jakarta.servlet.ServletRegistration.Dynamic
addServlet
(String servletName, jakarta.servlet.Servlet servlet) jakarta.servlet.ServletRegistration.Dynamic
addServlet
(String servletName, Class<? extends jakarta.servlet.Servlet> servletClass) jakarta.servlet.ServletRegistration.Dynamic
addServlet
(String servletName, String className) addServletMapping
(String servletName, String... urlPatterns) Add a mapping for the given servlet.<T extends jakarta.servlet.Filter>
TcreateFilter
(Class<T> filterClass) <T extends EventListener>
TcreateListener
(Class<T> clazz) <T extends jakarta.servlet.Servlet>
TcreateServlet
(Class<T> servletClass) void
declareRoles
(String... roles) void
destroy()
Destroy the web application.getAttribute
(String name) jakarta.servlet.ServletContext
getContext
(String uripath) jakarta.servlet.Servlet
Get the default servlet.Set<jakarta.servlet.SessionTrackingMode>
int
int
Set<jakarta.servlet.SessionTrackingMode>
jakarta.servlet.FilterRegistration
getFilterRegistration
(String filterName) List<jakarta.servlet.ServletContainerInitializer>
Gets the ServletContainerInitializersgetInitParameter
(String name) jakarta.servlet.descriptor.JspConfigDescriptor
int
Returns the major version.Get the web application manager.getMappings
(String servletName) Get the mappings for a particular servlet.getMimeType
(String filename) int
jakarta.servlet.RequestDispatcher
getNamedDispatcher
(String name) getRealPath
(String path) jakarta.servlet.ServletRequest
getRequest
(jakarta.servlet.ServletResponse response) Get the request associated with the response.Returns the default request character encoding.getRequestDispatcher
(String path) getResource
(String location) Get the resource.getResourceAsStream
(String location) Get the resource as a stream.getResourcePaths
(String path) jakarta.servlet.ServletResponse
getResponse
(jakarta.servlet.ServletRequest request) Get the response.Returns the default response character encoding.jakarta.servlet.ServletRegistration
getServletRegistration
(String servletName) jakarta.servlet.SessionCookieConfig
int
void
Initialize the web application.void
Marks the end of initializing declared (web.xml, annotations) artifactsvoid
Initialize the filters.void
Finish the initialization.void
Initialize the servlet container initializers.void
Initialize the servlets.boolean
Is the web application distributable.boolean
Is the web application initialized.boolean
Is the web application metadata complete.void
linkRequestAndResponse
(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response) Link the request and response.void
void
void
removeAttribute
(String name) Remove the attribute with the given name.removeServletMapping
(String urlPattern) Remove a mapping for a servlet.void
service
(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response) Service the request.void
setAttribute
(String name, Object value) void
setClassLoader
(ClassLoader classLoader) Set the class loader.void
setContextPath
(String contextPath) Set the context path.void
setDefaultServlet
(jakarta.servlet.Servlet defaultServlet) Set the default servlet.void
setDistributable
(boolean distributable) Set if the web application is distributable.void
setEffectiveMajorVersion
(int effectiveMajorVersion) Set the effective major version.void
setEffectiveMinorVersion
(int effectiveMinorVersion) Set the effective minor version.boolean
setInitParameter
(String name, String value) void
setJspConfigDescriptor
(jakarta.servlet.descriptor.JspConfigDescriptor jspConfigDescriptor) Set the JSP config descriptor.void
setMetadataComplete
(boolean metadataComplete) Set the metadata complete flag.void
setRequestCharacterEncoding
(String requestCharacterEncoding) void
setResponseCharacterEncoding
(String responseCharacterEncoding) void
setServletContextName
(String servletContextName) Set the servlet context name.void
setSessionTimeout
(int sessionTimeout) void
setSessionTrackingModes
(Set<jakarta.servlet.SessionTrackingMode> sessionTrackingModes) void
setVirtualServerName
(String virtualServerName) Set the virtual server name.void
setWebApplicationRequestMapper
(WebApplicationRequestMapper webApplicationRequestMapper) Set the web application request mapper.void
start()
Start servicing.void
stop()
Stop servicing.void
unlinkRequestAndResponse
(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response) Unlink the request and response.protected void
verifyRequestResponseTypes
(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response) Verify the request/response types.protected void
verifyState
(int desiredStatus, String message) Verify the web application state.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface cloud.piranha.core.api.WebApplication
addFilterMapping, addFilterMapping, getServletContextId
-
Field Details
-
SETUP
protected static final int SETUPStores the SETUP constant.- See Also:
-
INITIALIZED_DECLARED
protected static final int INITIALIZED_DECLAREDStores the INITIALIZED_DECLARED constant. This signals that web.xml, web-fragment.xml and annotations have been processed.- See Also:
-
INITIALIZED
protected static final int INITIALIZEDStores the INITIALIZED constant.- See Also:
-
SERVICING
protected static final int SERVICINGStores the SERVICING constant.- See Also:
-
ERROR
protected static final int ERRORStores the ERROR constant.- See Also:
-
attributes
Stores the attributes. -
classLoader
Stores the class loader. -
contextPath
Stores the context path. -
defaultServlet
protected jakarta.servlet.Servlet defaultServletStores the default servlet (if any). -
distributable
protected boolean distributableStores the boolean flag indicating if the web application is distributable. -
effectiveMajorVersion
protected int effectiveMajorVersionStores the effective major version. -
effectiveMinorVersion
protected int effectiveMinorVersionStores the effective minor version. -
servletContextName
Stores the servlet context name. -
virtualServerName
Stores the virtual server name. -
responseCharacterEncoding
Stores the response character encoding. -
status
protected int statusStores the status. -
responses
Stores the active responses and the associated requests. -
initializers
Stores the servlet container initializers. -
initParameters
Stores the init parameters. -
servletEnvironments
Stores the servlet environments -
filters
Stores the filters. -
contextAttributeListeners
Stores the servlet context attribute listeners. -
declaredContextListeners
Stores the servlet context listeners that were declared in web.xml, web-fragment.xml, or via annotations -
contextListeners
Stores the servlet context listeners that were not declared in web.xml, web-fragment.xml, or via annotations -
requestListeners
Stores the servlet request listeners. -
invocationFinder
Stores the invocation finder, which finds a Servlet, Filter(chain) and variants thereof to invoke for a given request path. -
metadataComplete
protected boolean metadataCompleteStores the metadata complete flag. -
requestCharacterEncoding
Stores the request character encoding. -
source
The source object where this web application instance originates from, i.e. the artifact this was last passed into by the container. Compare to the source object of an event. -
tainted
protected boolean taintedWhen we're in tainted mode, we have to throw exceptions for a large number of methods. Tainted mode is required for ServletContextListeners which have not been declared. At the moment of writing it's not clear why this tainted mode is needed. -
webApplicationRequestMapper
Stores the web application request mapper. -
manager
Stores the web application manager.
-
-
Constructor Details
-
DefaultWebApplication
public DefaultWebApplication()Constructor.
-
-
Method Details
-
addFilter
public jakarta.servlet.FilterRegistration.Dynamic addFilter(String filterName, Class<? extends jakarta.servlet.Filter> filterClass) - Specified by:
addFilter
in interfacejakarta.servlet.ServletContext
-
addFilter
- Specified by:
addFilter
in interfacejakarta.servlet.ServletContext
-
addFilter
public jakarta.servlet.FilterRegistration.Dynamic addFilter(String filterName, jakarta.servlet.Filter filter) - Specified by:
addFilter
in interfacejakarta.servlet.ServletContext
-
addFilterMapping
public Set<String> addFilterMapping(Set<jakarta.servlet.DispatcherType> dispatcherTypes, String filterName, boolean isMatchAfter, String... urlPatterns) Description copied from interface:WebApplication
Add a mapping for the given filter.- Specified by:
addFilterMapping
in interfaceWebApplication
- Parameters:
dispatcherTypes
- the dispatcher types. Can be null to use default DispatcherType.REQUEST.filterName
- the filter name.isMatchAfter
- true to call the filter this mapping applies to after declared ones, false to call it before declared ones.urlPatterns
- the URL patterns.- Returns:
- the possible empty set of already mapped URL patterns.
- See Also:
-
FilterRegistration.addMappingForUrlPatterns(EnumSet, boolean, String...)
-
addInitializer
Description copied from interface:WebApplication
Add a servlet container initializer.- Specified by:
addInitializer
in interfaceWebApplication
- Parameters:
className
- the class name.
-
addInitializer
public void addInitializer(jakarta.servlet.ServletContainerInitializer servletContainerInitializer) Description copied from interface:WebApplication
Add a servlet container initializer.- Specified by:
addInitializer
in interfaceWebApplication
- Parameters:
servletContainerInitializer
- the servletContainerInitializer instance
-
addJspFile
- Specified by:
addJspFile
in interfacejakarta.servlet.ServletContext
-
addListener
- Specified by:
addListener
in interfacejakarta.servlet.ServletContext
-
addListener
- Specified by:
addListener
in interfacejakarta.servlet.ServletContext
-
addListener
- Specified by:
addListener
in interfacejakarta.servlet.ServletContext
-
addResource
Description copied from interface:WebApplication
Add the resource.- Specified by:
addResource
in interfaceWebApplication
- Parameters:
resource
- the resouce.
-
addServlet
public jakarta.servlet.ServletRegistration.Dynamic addServlet(String servletName, Class<? extends jakarta.servlet.Servlet> servletClass) - Specified by:
addServlet
in interfacejakarta.servlet.ServletContext
-
addServlet
- Specified by:
addServlet
in interfacejakarta.servlet.ServletContext
-
addServlet
public jakarta.servlet.ServletRegistration.Dynamic addServlet(String servletName, jakarta.servlet.Servlet servlet) - Specified by:
addServlet
in interfacejakarta.servlet.ServletContext
-
addServletMapping
Description copied from interface:WebApplication
Add a mapping for the given servlet.- Specified by:
addServletMapping
in interfaceWebApplication
- Parameters:
servletName
- the servlet name.urlPatterns
- the URL patterns.- Returns:
- the possible empty set of already mapped URL patterns.
- See Also:
-
ServletRegistration.addMapping(String...)
-
removeServletMapping
Description copied from interface:WebApplication
Remove a mapping for a servlet.- Specified by:
removeServletMapping
in interfaceWebApplication
- Parameters:
urlPattern
- the URL pattern- Returns:
- the Servlet name the pattern was mapped to, or null if no prior mapping.
-
createFilter
public <T extends jakarta.servlet.Filter> T createFilter(Class<T> filterClass) throws jakarta.servlet.ServletException - Specified by:
createFilter
in interfacejakarta.servlet.ServletContext
- Throws:
jakarta.servlet.ServletException
-
createListener
public <T extends EventListener> T createListener(Class<T> clazz) throws jakarta.servlet.ServletException - Specified by:
createListener
in interfacejakarta.servlet.ServletContext
- Throws:
jakarta.servlet.ServletException
-
createServlet
public <T extends jakarta.servlet.Servlet> T createServlet(Class<T> servletClass) throws jakarta.servlet.ServletException - Specified by:
createServlet
in interfacejakarta.servlet.ServletContext
- Throws:
jakarta.servlet.ServletException
-
declareRoles
- Specified by:
declareRoles
in interfacejakarta.servlet.ServletContext
-
destroy
public void destroy()Description copied from interface:WebApplication
Destroy the web application.- Specified by:
destroy
in interfaceWebApplication
-
getAttribute
- Specified by:
getAttribute
in interfacejakarta.servlet.ServletContext
-
getAttributeNames
- Specified by:
getAttributeNames
in interfacejakarta.servlet.ServletContext
-
getClassLoader
- Specified by:
getClassLoader
in interfacejakarta.servlet.ServletContext
-
getContext
- Specified by:
getContext
in interfacejakarta.servlet.ServletContext
-
getContextPath
- Specified by:
getContextPath
in interfacejakarta.servlet.ServletContext
-
getDefaultSessionTrackingModes
- Specified by:
getDefaultSessionTrackingModes
in interfacejakarta.servlet.ServletContext
-
getDefaultServlet
public jakarta.servlet.Servlet getDefaultServlet()Description copied from interface:WebApplication
Get the default servlet.- Specified by:
getDefaultServlet
in interfaceWebApplication
- Returns:
- the default Servlet.
-
getEffectiveMajorVersion
public int getEffectiveMajorVersion()- Specified by:
getEffectiveMajorVersion
in interfacejakarta.servlet.ServletContext
-
getEffectiveMinorVersion
public int getEffectiveMinorVersion()- Specified by:
getEffectiveMinorVersion
in interfacejakarta.servlet.ServletContext
-
setEffectiveMajorVersion
public void setEffectiveMajorVersion(int effectiveMajorVersion) Description copied from interface:WebApplication
Set the effective major version.- Specified by:
setEffectiveMajorVersion
in interfaceWebApplication
- Parameters:
effectiveMajorVersion
- the effective major version.
-
setEffectiveMinorVersion
public void setEffectiveMinorVersion(int effectiveMinorVersion) Description copied from interface:WebApplication
Set the effective minor version.- Specified by:
setEffectiveMinorVersion
in interfaceWebApplication
- Parameters:
effectiveMinorVersion
- the effective minor version.
-
getEffectiveSessionTrackingModes
- Specified by:
getEffectiveSessionTrackingModes
in interfacejakarta.servlet.ServletContext
-
getFilterRegistration
- Specified by:
getFilterRegistration
in interfacejakarta.servlet.ServletContext
-
getFilterRegistrations
- Specified by:
getFilterRegistrations
in interfacejakarta.servlet.ServletContext
-
getInitParameter
- Specified by:
getInitParameter
in interfacejakarta.servlet.ServletContext
-
getInitParameterNames
- Specified by:
getInitParameterNames
in interfacejakarta.servlet.ServletContext
-
getInitializers
Description copied from interface:WebApplication
Gets the ServletContainerInitializers- Specified by:
getInitializers
in interfaceWebApplication
- Returns:
- list of ServletContainerInitializers
-
getJspConfigDescriptor
public jakarta.servlet.descriptor.JspConfigDescriptor getJspConfigDescriptor()- Specified by:
getJspConfigDescriptor
in interfacejakarta.servlet.ServletContext
-
getMajorVersion
public int getMajorVersion()Returns the major version.- Specified by:
getMajorVersion
in interfacejakarta.servlet.ServletContext
- Returns:
- the major version
-
getMappings
Description copied from interface:WebApplication
Get the mappings for a particular servlet.- Specified by:
getMappings
in interfaceWebApplication
- Parameters:
servletName
- the servlet name.- Returns:
- the possible empty set of mapped URL patterns.
- See Also:
-
ServletRegistration.getMappings()
-
getMimeType
- Specified by:
getMimeType
in interfacejakarta.servlet.ServletContext
-
getMinorVersion
public int getMinorVersion()- Specified by:
getMinorVersion
in interfacejakarta.servlet.ServletContext
-
getRealPath
- Specified by:
getRealPath
in interfacejakarta.servlet.ServletContext
-
getRequest
public jakarta.servlet.ServletRequest getRequest(jakarta.servlet.ServletResponse response) Get the request associated with the response.- Specified by:
getRequest
in interfaceWebApplication
- Parameters:
response
- the response.- Returns:
- the request.
-
getRequestCharacterEncoding
Returns the default request character encoding.- Specified by:
getRequestCharacterEncoding
in interfacejakarta.servlet.ServletContext
- Returns:
- the default request character encoding
-
getResponseCharacterEncoding
Returns the default response character encoding.- Specified by:
getResponseCharacterEncoding
in interfacejakarta.servlet.ServletContext
- Returns:
- the default response character encoding
-
getResource
Get the resource.- Specified by:
getResource
in interfacejakarta.servlet.ServletContext
- Parameters:
location
- the location.- Returns:
- the URL.
- Throws:
MalformedURLException
- when the URL is malformed.
-
getResourceAsStream
Get the resource as a stream.- Specified by:
getResourceAsStream
in interfacejakarta.servlet.ServletContext
- Parameters:
location
- the resource location- Returns:
- the input stream, or null if not found.
-
getResourcePaths
- Specified by:
getResourcePaths
in interfacejakarta.servlet.ServletContext
-
getResponse
public jakarta.servlet.ServletResponse getResponse(jakarta.servlet.ServletRequest request) Description copied from interface:WebApplication
Get the response.- Specified by:
getResponse
in interfaceWebApplication
- Parameters:
request
- the request.- Returns:
- the response.
-
getServerInfo
- Specified by:
getServerInfo
in interfacejakarta.servlet.ServletContext
-
getServletContextName
- Specified by:
getServletContextName
in interfacejakarta.servlet.ServletContext
-
getServletRegistration
- Specified by:
getServletRegistration
in interfacejakarta.servlet.ServletContext
-
getServletRegistrations
- Specified by:
getServletRegistrations
in interfacejakarta.servlet.ServletContext
-
getSessionCookieConfig
public jakarta.servlet.SessionCookieConfig getSessionCookieConfig()- Specified by:
getSessionCookieConfig
in interfacejakarta.servlet.ServletContext
-
getSessionTimeout
public int getSessionTimeout()- Specified by:
getSessionTimeout
in interfacejakarta.servlet.ServletContext
-
getVirtualServerName
- Specified by:
getVirtualServerName
in interfacejakarta.servlet.ServletContext
-
initialize
public void initialize()Description copied from interface:WebApplication
Initialize the web application.- Specified by:
initialize
in interfaceWebApplication
-
initializeDeclaredFinish
public void initializeDeclaredFinish()Description copied from interface:WebApplication
Marks the end of initializing declared (web.xml, annotations) artifacts- Specified by:
initializeDeclaredFinish
in interfaceWebApplication
-
initializeFinish
public void initializeFinish()Finish the initialization.- Specified by:
initializeFinish
in interfaceWebApplication
-
initializeFilters
public void initializeFilters()Initialize the filters.- Specified by:
initializeFilters
in interfaceWebApplication
-
initializeInitializers
public void initializeInitializers()Initialize the servlet container initializers.- Specified by:
initializeInitializers
in interfaceWebApplication
-
initializeServlets
public void initializeServlets()Initialize the servlets.- Specified by:
initializeServlets
in interfaceWebApplication
-
isDistributable
public boolean isDistributable()Is the web application distributable.- Specified by:
isDistributable
in interfaceWebApplication
- Returns:
- true if it is, false otherwise.
-
isInitialized
public boolean isInitialized()Description copied from interface:WebApplication
Is the web application initialized.- Specified by:
isInitialized
in interfaceWebApplication
- Returns:
- true if it is, false otherwise.
-
isMetadataComplete
public boolean isMetadataComplete()Description copied from interface:WebApplication
Is the web application metadata complete.- Specified by:
isMetadataComplete
in interfaceWebApplication
- Returns:
- true if it is, false otherwise.
-
linkRequestAndResponse
public void linkRequestAndResponse(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response) Link the request and response.- Specified by:
linkRequestAndResponse
in interfaceWebApplication
- Parameters:
request
- the request.response
- the response.
-
log
- Specified by:
log
in interfacejakarta.servlet.ServletContext
-
log
- Specified by:
log
in interfacejakarta.servlet.ServletContext
-
removeAttribute
Remove the attribute with the given name.- Specified by:
removeAttribute
in interfacejakarta.servlet.ServletContext
- Parameters:
name
- the name.
-
service
public void service(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response) throws jakarta.servlet.ServletException, IOException Description copied from interface:WebApplication
Service the request.- Specified by:
service
in interfaceWebApplication
- Parameters:
request
- the request.response
- the response.- Throws:
jakarta.servlet.ServletException
- when a servlet error occurs.IOException
- when an I/O error occurs.
-
setAttribute
- Specified by:
setAttribute
in interfacejakarta.servlet.ServletContext
-
setClassLoader
Description copied from interface:WebApplication
Set the class loader.- Specified by:
setClassLoader
in interfaceWebApplication
- Parameters:
classLoader
- the class loader.
-
setContextPath
Description copied from interface:WebApplication
Set the context path.- Specified by:
setContextPath
in interfaceWebApplication
- Parameters:
contextPath
- the context path.
-
setDefaultServlet
public void setDefaultServlet(jakarta.servlet.Servlet defaultServlet) Description copied from interface:WebApplication
Set the default servlet.- Specified by:
setDefaultServlet
in interfaceWebApplication
- Parameters:
defaultServlet
- the default servlet.
-
setDistributable
public void setDistributable(boolean distributable) Description copied from interface:WebApplication
Set if the web application is distributable.- Specified by:
setDistributable
in interfaceWebApplication
- Parameters:
distributable
- the distributable flag.
-
setInitParameter
- Specified by:
setInitParameter
in interfacejakarta.servlet.ServletContext
-
setRequestCharacterEncoding
- Specified by:
setRequestCharacterEncoding
in interfacejakarta.servlet.ServletContext
-
setResponseCharacterEncoding
- Specified by:
setResponseCharacterEncoding
in interfacejakarta.servlet.ServletContext
-
setServletContextName
Description copied from interface:WebApplication
Set the servlet context name.- Specified by:
setServletContextName
in interfaceWebApplication
- Parameters:
servletContextName
- the servlet context name.
-
setSessionTrackingModes
- Specified by:
setSessionTrackingModes
in interfacejakarta.servlet.ServletContext
-
setSessionTimeout
public void setSessionTimeout(int sessionTimeout) - Specified by:
setSessionTimeout
in interfacejakarta.servlet.ServletContext
-
setVirtualServerName
Set the virtual server name.- Parameters:
virtualServerName
- the virtual server name.
-
setWebApplicationRequestMapper
Description copied from interface:WebApplication
Set the web application request mapper.- Specified by:
setWebApplicationRequestMapper
in interfaceWebApplication
- Parameters:
webApplicationRequestMapper
- the web application request mapper.
-
start
public void start()Description copied from interface:WebApplication
Start servicing.- Specified by:
start
in interfaceWebApplication
-
stop
public void stop()Description copied from interface:WebApplication
Stop servicing.- Specified by:
stop
in interfaceWebApplication
-
unlinkRequestAndResponse
public void unlinkRequestAndResponse(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response) Description copied from interface:WebApplication
Unlink the request and response.- Specified by:
unlinkRequestAndResponse
in interfaceWebApplication
- Parameters:
request
- the request.response
- the response.
-
getRequestDispatcher
- Specified by:
getRequestDispatcher
in interfacejakarta.servlet.ServletContext
-
getNamedDispatcher
- Specified by:
getNamedDispatcher
in interfacejakarta.servlet.ServletContext
-
setMetadataComplete
public void setMetadataComplete(boolean metadataComplete) Description copied from interface:WebApplication
Set the metadata complete flag.- Specified by:
setMetadataComplete
in interfaceWebApplication
- Parameters:
metadataComplete
- the metadata complete flag.
-
verifyRequestResponseTypes
protected void verifyRequestResponseTypes(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response) throws jakarta.servlet.ServletException Verify the request/response types.- Parameters:
request
- the request.response
- the response.- Throws:
jakarta.servlet.ServletException
- when request or response is invalid.
-
verifyState
Verify the web application state.- Parameters:
desiredStatus
- the desired status.message
- the message.
-
getManager
Description copied from interface:WebApplication
Get the web application manager.- Specified by:
getManager
in interfaceWebApplication
- Returns:
- the web application manager.
-
setJspConfigDescriptor
public void setJspConfigDescriptor(jakarta.servlet.descriptor.JspConfigDescriptor jspConfigDescriptor) Description copied from interface:WebApplication
Set the JSP config descriptor.- Specified by:
setJspConfigDescriptor
in interfaceWebApplication
- Parameters:
jspConfigDescriptor
- the descriptor.
-