java.lang.Object
cloud.piranha.webapp.impl.DefaultWebApplication
- All Implemented Interfaces:
WebApplication
,ServletContext
- Direct Known Subclasses:
CrossContextWebApplication
,MicroWebApplication
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
FieldsModifier and TypeFieldDescriptionprotected AnnotationManager
Stores the annotation manager.protected AsyncManager
Stores the async manager.Stores the attributes.protected ClassLoader
Stores the class loader.protected List<ServletContextAttributeListener>
Stores the servlet context attribute listeners.protected List<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 List<ServletContextListener>
Stores the servlet context listeners that were declared in web.xml, web-fragment.xml, or via annotationsprotected 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 int
Stores the ERROR constant.protected DefaultErrorPageManager
Stores the error page managerprotected Map<String,DefaultFilterEnvironment>
Stores the filters.protected HttpRequestManager
Stores the request manager.protected HttpSessionManager
Stores the session manager.protected static int
Stores the INITIALIZED constant.protected static int
Stores the INITIALIZED_DECLARED constant.protected List<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 JspManager
Stores the JSP manager.protected LocaleEncodingManager
Stores the locale encoding managerprotected LoggingManager
Stores the logging manager.protected MimeTypeManager
Stores the mime type manager.protected MultiPartManager
Stores the multi part manager.protected NamingManager
Stores the naming manager.protected ObjectInstanceManager
Stores the object instance manager.protected PolicyManager
Stores the Policy manager.protected String
Stores the request character encoding.protected List<ServletRequestListener>
Stores the servlet request listeners.protected ResourceManager
Stores the resource manager.protected String
Stores the response character encoding.protected Map<ServletResponse,ServletRequest>
Stores the active responses and the associated requests.protected SecurityManager
Stores the security manager.protected static int
Stores the SERVICING constant.protected String
Stores the servlet context name.protected Map<String,DefaultServletEnvironment>
Stores the servlet environmentsprotected static 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.protected WelcomeFileManager
Stores the welcome file manager.Fields inherited from interface jakarta.servlet.ServletContext
ORDERED_LIBS, TEMPDIR
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addErrorPage(int code, String location)
Adds an error page to be forwarded to on the given HTTP status codevoid
addErrorPage(String exception, String location)
Adds an error page to be forwarded to on the given exceptionAdd the filter.Add the filter.Add the filter.addFilterMapping(Set<DispatcherType> dispatcherTypes, String filterName, boolean isMatchAfter, String... urlPatterns)
Add a mapping for the given filter.void
addInitializer(ServletContainerInitializer servletContainerInitializer)
Add a servlet container initializer.void
addInitializer(String className)
Add a servlet container initializer.addJspFile(String servletName, String jspFile)
Add a JSP file.void
addListener(Class<? extends EventListener> type)
Add the listener.void
addListener(String className)
Add the listener.<T extends EventListener>
voidaddListener(T listener)
Add the listener.void
addResource(Resource resource)
Add the resource.addServlet(String servletName, Servlet servlet)
Add the servlet.addServlet(String servletName, Class<? extends Servlet> servletClass)
Add the servlet.addServlet(String servletName, String className)
Add the servlet.addServletMapping(String servletName, String... urlPatterns)
Add a mapping for the given servlet.<T extends Filter>
TcreateFilter(Class<T> filterClass)
Create the filter.<T extends EventListener>
TcreateListener(Class<T> clazz)
Create the listener.<T extends Servlet>
TcreateServlet(Class<T> servletClass)
Create the servlet.void
declareRoles(String... roles)
Declare roles.void
destroy()
Destroy the web application.Gets the annotation manager.Returns the async manager.getAttribute(String name)
Get the attribute.Returns the attribute names.Returns the class loader.getContext(String uripath)
Get the servlet context for the given uripath.Returns the context path.Returns the default Servlet.Returns the default session tracking modes.boolean
Are we denying uncovered HTTP methods.int
Returns the effective major version.int
Returns the effective minor version.Returns the effective tracking modes.getFilterRegistration(String filterName)
Get the filter registration.Map<String,? extends FilterRegistration>
Returns the filter registrations.Returns the HttpRequestManager.Returns the session manager.Gets the ServletContainerInitializersgetInitParameter(String name)
Get the init parameter.Get the init parameter names.Returns the JSP config descriptor.Returns the locale encoding manager.int
Returns the major version.getMappings(String servletName)
Get the servlet mappings for the given servlet.getMimeType(String filename)
Returns the mime type.Returns the mime type manager.int
Returns the minor version.Returns the multi part manager.getNamedDispatcher(String name)
Get the name request dispatcher.Returns the naming manager.Returns the DependencyInjectionManager.Returns the policy manager.getRealPath(String path)
Returns the real path.getRequest(ServletResponse response)
Get the request associated with the response.Returns the default request character encoding.getRequestDispatcher(String path)
Returns the request dispatcher.getResource(String location)
Get the resource.getResourceAsStream(String location)
Get the resource as a stream.getResourcePaths(String path)
Returns the resource paths.getResponse(ServletRequest request)
Returns the response.Returns the default response character encoding.Returns the security manager.Returns the server info.getServlet(String name)
Deprecated.Get the servlet context name (aka display-name).Deprecated.getServletRegistration(String servletName)
Get the servlet registration.Map<String,? extends ServletRegistration>
Returns the servlet registrations.Deprecated.Returns the session cookie config.int
Returns the default session timeout.Returns the virtual server name.Returns the welcome file manager.void
Initialize the web application.void
Finish the initialization.void
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.void
linkRequestAndResponse(ServletRequest request, ServletResponse response)
Link the request and response.void
Deprecated.void
Log a message.void
Log a message.void
removeAttribute(String name)
Remove the attribute with the given name.void
service(ServletRequest request, ServletResponse response)
Service the request using this web application.void
setAnnotationManager(AnnotationManager annotationManager)
Sets the annotation manager.void
setAttribute(String name, Object value)
Set the attribute.void
setClassLoader(ClassLoader classLoader)
Set the class-loader.void
setContextPath(String contextPath)
Set the context path.void
setDefaultServlet(Servlet defaultServlet)
Set the default servlet.void
setDenyUncoveredHttpMethods(boolean denyUncoveredHttpMethods)
Set if we are denying uncovered HTTP methods.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.void
setHttpRequestManager(HttpRequestManager httpRequestManager)
Set the HTTP request manager.void
setHttpSessionManager(HttpSessionManager httpSessionManager)
Set the HTTP session manager.boolean
setInitParameter(String name, String value)
Set the init parameter.void
setJspManager(JspManager jspManager)
Set the JSP manager.void
setLocaleEncodingManager(LocaleEncodingManager localeEncodingManager)
Set the locale encoding managervoid
setLoggingManager(LoggingManager loggingManager)
Set the logging manager.void
setMimeTypeManager(MimeTypeManager mimeTypeManager)
Set the mimeType manager.void
setMultiPartManager(MultiPartManager multiPartManager)
Set the multi part manager.void
setNamingManager(NamingManager namingManager)
Set the naming manager.void
setObjectInstanceManager(ObjectInstanceManager objectInstanceManager)
Set the object instance manager.void
setRequestCharacterEncoding(String requestCharacterEncoding)
Set the default request character encoding.void
setResourceManager(ResourceManager resourceManager)
Set the resource manager.void
setResponseCharacterEncoding(String responseCharacterEncoding)
Set the default response character encoding.void
setSecurityManager(SecurityManager securityManager)
Set the security manager.void
setServletContextName(String servletContextName)
Set the servlet context name.void
setSessionTimeout(int sessionTimeout)
Set the default session timeout.void
setSessionTrackingModes(Set<SessionTrackingMode> sessionTrackingModes)
Set the session tracking modes.void
setVirtualServerName(String virtualServerName)
Set the virtual server name.void
setWebApplicationRequestMapper(WebApplicationRequestMapper webApplicationRequestMapper)
Set the web application request mapper.void
setWelcomeFileManager(WelcomeFileManager welcomeFileManager)
Set the welcome file manager.void
start()
Start servicing.void
stop()
Stop servicing.void
unlinkRequestAndResponse(ServletRequest request, ServletResponse response)
Unlink the request and response.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.webapp.api.WebApplication
addFilterMapping, addFilterMapping, getServletContextId
-
Field Details
-
SETUP
protected static final int SETUPStores the SETUP constant.- See Also:
- Constant Field Values
-
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:
- Constant Field Values
-
INITIALIZED
protected static final int INITIALIZEDStores the INITIALIZED constant.- See Also:
- Constant Field Values
-
SERVICING
protected static final int SERVICINGStores the SERVICING constant.- See Also:
- Constant Field Values
-
ERROR
protected static final int ERRORStores the ERROR constant.- See Also:
- Constant Field Values
-
asyncManager
Stores the async manager. -
classLoader
Stores the class loader. -
contextPath
Stores the context path. -
defaultServlet
Stores 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. -
namingManager
Stores the naming manager. -
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. -
attributes
Stores the attributes. -
localeEncodingManager
Stores the locale encoding manager -
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. -
objectInstanceManager
Stores the object instance manager. -
annotationManager
Stores the annotation manager. -
resourceManager
Stores the resource manager. -
httpSessionManager
Stores the session manager. -
errorPageManager
Stores the error page manager -
securityManager
Stores the security manager. -
jspManager
Stores the JSP manager. -
loggingManager
Stores the logging manager. -
httpRequestManager
Stores the request manager. -
mimeTypeManager
Stores the mime type manager. -
multiPartManager
Stores the multi part manager. -
policyManager
Stores the Policy manager. -
requestCharacterEncoding
Stores the request character encoding. -
webApplicationRequestMapper
Stores the web application request mapper. -
welcomeFileManager
Stores the welcome file manager. -
invocationFinder
Stores the invocation finder, which finds a Servlet, Filter(chain) and variants thereof to invoke for a given request path. -
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. -
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.
-
-
Constructor Details
-
DefaultWebApplication
public DefaultWebApplication()Constructor.
-
-
Method Details
-
addFilter
public FilterRegistration.Dynamic addFilter(String filterName, Class<? extends Filter> filterClass)Description copied from interface:ServletContext
Add the filter.- Specified by:
addFilter
in interfaceServletContext
- Parameters:
filterName
- the filter name.filterClass
- the filter class.- Returns:
- the dynamic filter registration.
-
addFilter
Description copied from interface:ServletContext
Add the filter.- Specified by:
addFilter
in interfaceServletContext
- Parameters:
filterName
- the filter name.className
- the class name.- Returns:
- the dynamic filter registration.
-
addFilter
Description copied from interface:ServletContext
Add the filter.- Specified by:
addFilter
in interfaceServletContext
- Parameters:
filterName
- the filter name.filter
- the filter.- Returns:
- the dynamic filter registration.
-
addFilterMapping
public Set<String> addFilterMapping(Set<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
Description copied from interface:WebApplication
Add a servlet container initializer.- Specified by:
addInitializer
in interfaceWebApplication
- Parameters:
servletContainerInitializer
- the servletContainerInitializer instance
-
addJspFile
Description copied from interface:ServletContext
Add a JSP file.- Specified by:
addJspFile
in interfaceServletContext
- Parameters:
servletName
- the name of the servlet to be used.jspFile
- the path of the JSP file.- Returns:
- the dynamic servlet registration.
-
addListener
Description copied from interface:ServletContext
Add the listener.- Specified by:
addListener
in interfaceServletContext
- Parameters:
className
- the class name.
-
addListener
Description copied from interface:ServletContext
Add the listener.- Specified by:
addListener
in interfaceServletContext
- Parameters:
type
- the listener class.
-
addListener
Description copied from interface:ServletContext
Add the listener.- Specified by:
addListener
in interfaceServletContext
- Type Parameters:
T
- the type.- Parameters:
listener
- the listener.
-
addResource
Description copied from interface:WebApplication
Add the resource.- Specified by:
addResource
in interfaceWebApplication
- Parameters:
resource
- the resouce.
-
addServlet
public ServletRegistration.Dynamic addServlet(String servletName, Class<? extends Servlet> servletClass)Description copied from interface:ServletContext
Add the servlet.- Specified by:
addServlet
in interfaceServletContext
- Parameters:
servletName
- the servlet name.servletClass
- the servlet class.- Returns:
- the dynamic servlet registration.
-
addServlet
Description copied from interface:ServletContext
Add the servlet.- Specified by:
addServlet
in interfaceServletContext
- Parameters:
servletName
- the servlet name.className
- the class name.- Returns:
- the servlet dynamic registration.
-
addServlet
Description copied from interface:ServletContext
Add the servlet.- Specified by:
addServlet
in interfaceServletContext
- Parameters:
servletName
- the servlet name.servlet
- the servlet.- Returns:
- the dynamic servlet registration.
-
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...)
-
addErrorPage
Description copied from interface:WebApplication
Adds an error page to be forwarded to on the given HTTP status code- Specified by:
addErrorPage
in interfaceWebApplication
- Parameters:
code
- the HTTP code for which the error page is to be invokedlocation
- the location of the error page
-
addErrorPage
Description copied from interface:WebApplication
Adds an error page to be forwarded to on the given exception- Specified by:
addErrorPage
in interfaceWebApplication
- Parameters:
exception
- the exception for which the error page is to be invokedlocation
- the location of the error page
-
createFilter
Description copied from interface:ServletContext
Create the filter.- Specified by:
createFilter
in interfaceServletContext
- Type Parameters:
T
- the filter type.- Parameters:
filterClass
- the class.- Returns:
- the filter.
- Throws:
ServletException
- when a servlet error occurs.
-
createListener
Create the listener.- Specified by:
createListener
in interfaceServletContext
- Type Parameters:
T
- the type.- Parameters:
clazz
- the class of the listener to create.- Returns:
- the listener.
- Throws:
ServletException
- when it fails to create the listener.
-
createServlet
Create the servlet.- Specified by:
createServlet
in interfaceServletContext
- Type Parameters:
T
- the return type.- Parameters:
servletClass
- the servlet class.- Returns:
- the servlet.
- Throws:
ServletException
- when a Servlet error occurs.
-
declareRoles
Declare roles.- Specified by:
declareRoles
in interfaceServletContext
- Parameters:
roles
- the roles.
-
destroy
public void destroy()Destroy the web application.- Specified by:
destroy
in interfaceWebApplication
-
getAttribute
Get the attribute.- Specified by:
getAttribute
in interfaceServletContext
- Parameters:
name
- the attribute name.- Returns:
- the attribute value.
-
getAttributeNames
Returns the attribute names.- Specified by:
getAttributeNames
in interfaceServletContext
- Returns:
- the attribute names
-
getDenyUncoveredHttpMethods
public boolean getDenyUncoveredHttpMethods()Are we denying uncovered HTTP methods.- Specified by:
getDenyUncoveredHttpMethods
in interfaceWebApplication
- Returns:
- true if we are, false otherwise.
-
getClassLoader
Returns the class loader.- Specified by:
getClassLoader
in interfaceServletContext
- Returns:
- the class loader
-
getContext
Get the servlet context for the given uripath.- Specified by:
getContext
in interfaceServletContext
- Parameters:
uripath
- the uripath.- Returns:
- the servlet context.
-
getContextPath
Returns the context path.- Specified by:
getContextPath
in interfaceServletContext
- Returns:
- the context path
-
getDefaultSessionTrackingModes
Description copied from interface:ServletContext
Returns the default session tracking modes.- Specified by:
getDefaultSessionTrackingModes
in interfaceServletContext
- Returns:
- the default session tracking modes
- See Also:
ServletContext.getDefaultSessionTrackingModes()
-
getDefaultServlet
Description copied from interface:WebApplication
Returns the default Servlet.- Specified by:
getDefaultServlet
in interfaceWebApplication
- Returns:
- the default Servlet
- See Also:
WebApplication.getDefaultServlet()
-
getObjectInstanceManager
Returns the DependencyInjectionManager.- Specified by:
getObjectInstanceManager
in interfaceWebApplication
- Returns:
- the DependencyInjectionManager
-
getEffectiveMajorVersion
public int getEffectiveMajorVersion()Returns the effective major version.- Specified by:
getEffectiveMajorVersion
in interfaceServletContext
- Returns:
- the effective major version
-
getEffectiveMinorVersion
public int getEffectiveMinorVersion()Returns the effective minor version.- Specified by:
getEffectiveMinorVersion
in interfaceServletContext
- Returns:
- the effective minor version
-
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.
-
getMultiPartManager
Returns the multi part manager.- Specified by:
getMultiPartManager
in interfaceWebApplication
- Returns:
- the multi part manager
-
getEffectiveSessionTrackingModes
Returns the effective tracking modes.- Specified by:
getEffectiveSessionTrackingModes
in interfaceServletContext
- Returns:
- the effective tracking modes
-
getFilterRegistration
Get the filter registration.- Specified by:
getFilterRegistration
in interfaceServletContext
- Parameters:
filterName
- the filter name.- Returns:
- the filter registration, or null if not found.
-
getFilterRegistrations
Returns the filter registrations.- Specified by:
getFilterRegistrations
in interfaceServletContext
- Returns:
- the filter registrations
-
getInitParameter
Get the init parameter.- Specified by:
getInitParameter
in interfaceServletContext
- Parameters:
name
- the init parameter name.- Returns:
- the init parameter value.
-
getInitParameterNames
Get the init parameter names.- Specified by:
getInitParameterNames
in interfaceServletContext
- Returns:
- the enumeration.
-
getInitializers
Description copied from interface:WebApplication
Gets the ServletContainerInitializers- Specified by:
getInitializers
in interfaceWebApplication
- Returns:
- list of ServletContainerInitializers
-
getJspConfigDescriptor
Returns the JSP config descriptor.- Specified by:
getJspConfigDescriptor
in interfaceServletContext
- Returns:
- the JSP config descriptor
-
getMajorVersion
public int getMajorVersion()Returns the major version.- Specified by:
getMajorVersion
in interfaceServletContext
- Returns:
- the major version
-
getMappings
Get the servlet mappings for the given servlet.- Specified by:
getMappings
in interfaceWebApplication
- Parameters:
servletName
- the name of the servlet.- Returns:
- the servlet mappings.
- See Also:
ServletRegistration.getMappings()
-
getMimeType
Returns the mime type.- Specified by:
getMimeType
in interfaceServletContext
- Parameters:
filename
- the filename.- Returns:
- the mime type
-
getMimeTypeManager
Returns the mime type manager.- Specified by:
getMimeTypeManager
in interfaceWebApplication
- Returns:
- the mime type manager
-
getMinorVersion
public int getMinorVersion()Returns the minor version.- Specified by:
getMinorVersion
in interfaceServletContext
- Returns:
- the minor version
-
getRealPath
Returns the real path.- Specified by:
getRealPath
in interfaceServletContext
- Parameters:
path
- the path- Returns:
- the real path
-
getRequest
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 interfaceServletContext
- Returns:
- the default request character encoding
-
getResponseCharacterEncoding
Returns the default response character encoding.- Specified by:
getResponseCharacterEncoding
in interfaceServletContext
- Returns:
- the default response character encoding
-
getResource
Get the resource.- Specified by:
getResource
in interfaceServletContext
- 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 interfaceServletContext
- Parameters:
location
- the resource location- Returns:
- the input stream, or null if not found.
-
getResourcePaths
Returns the resource paths.- Specified by:
getResourcePaths
in interfaceServletContext
- Parameters:
path
- the path.- Returns:
- the resource paths
-
getResponse
Returns the response.- Specified by:
getResponse
in interfaceWebApplication
- Parameters:
request
- the request.- Returns:
- the response
-
getSecurityManager
Returns the security manager.- Specified by:
getSecurityManager
in interfaceWebApplication
- Returns:
- the security manager
-
getAnnotationManager
Description copied from interface:WebApplication
Gets the annotation manager.- Specified by:
getAnnotationManager
in interfaceWebApplication
- Returns:
- the annotation manager.
-
setAnnotationManager
Description copied from interface:WebApplication
Sets the annotation manager.- Specified by:
setAnnotationManager
in interfaceWebApplication
- Parameters:
annotationManager
- the annotation manager
-
getServerInfo
Returns the server info.- Specified by:
getServerInfo
in interfaceServletContext
- Returns:
- the server info
-
getServlet
Deprecated.Get the servlet.- Specified by:
getServlet
in interfaceServletContext
- Parameters:
name
- the name of the servlet.- Returns:
- null
- Throws:
ServletException
- when a Servlet error occurs.
-
getServletContextName
Get the servlet context name (aka display-name).- Specified by:
getServletContextName
in interfaceServletContext
- Returns:
- the servlet context name.
-
getServletNames
Deprecated.Returns the servlet names.- Specified by:
getServletNames
in interfaceServletContext
- Returns:
- the servlet names
-
getServletRegistration
Get the servlet registration.- Specified by:
getServletRegistration
in interfaceServletContext
- Parameters:
servletName
- the servlet name.- Returns:
- the servlet registration, or null if not found.
-
getServletRegistrations
Returns the servlet registrations.- Specified by:
getServletRegistrations
in interfaceServletContext
- Returns:
- the servlet registrations
-
getServlets
Deprecated.Get the servlets.- Specified by:
getServlets
in interfaceServletContext
- Returns:
- the servlets (empty enumeration).
-
getSessionCookieConfig
Returns the session cookie config.- Specified by:
getSessionCookieConfig
in interfaceServletContext
- Returns:
- the session cookie config
-
getSessionTimeout
public int getSessionTimeout()Returns the default session timeout.- Specified by:
getSessionTimeout
in interfaceServletContext
- Returns:
- the default session timeout
-
getHttpSessionManager
Returns the session manager.- Specified by:
getHttpSessionManager
in interfaceWebApplication
- Returns:
- the session manager
-
getVirtualServerName
Returns the virtual server name.- Specified by:
getVirtualServerName
in interfaceServletContext
- Returns:
- the virtual server name
-
getWelcomeFileManager
Returns the welcome file manager.- Specified by:
getWelcomeFileManager
in interfaceWebApplication
- Returns:
- the welcome file manager
-
initialize
public void initialize()Initialize the web application.- Specified by:
initialize
in interfaceWebApplication
-
initializeDeclaredFinish
public void initializeDeclaredFinish()Finish the initialization.- 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()Is the web application initialized.- Specified by:
isInitialized
in interfaceWebApplication
- Returns:
- true if it is, false otherwise.
-
linkRequestAndResponse
Link the request and response.- Specified by:
linkRequestAndResponse
in interfaceWebApplication
- Parameters:
request
- the request.response
- the response.
-
log
Deprecated.Log a message.- Specified by:
log
in interfaceServletContext
- Parameters:
exception
- the exception.message
- the message.
-
log
Log a message.- Specified by:
log
in interfaceServletContext
- Parameters:
message
- the message.throwable
- the throwable.
-
log
Log a message.- Specified by:
log
in interfaceServletContext
- Parameters:
message
- the message.
-
removeAttribute
Remove the attribute with the given name.- Specified by:
removeAttribute
in interfaceServletContext
- Parameters:
name
- the name.
-
service
public void service(ServletRequest request, ServletResponse response) throws ServletException, IOExceptionService the request using this web application.- Specified by:
service
in interfaceWebApplication
- Parameters:
request
- the servlet request.response
- the servlet response.- Throws:
IOException
- when an I/O error occurs.ServletException
- when a servlet error occurs.
-
setAttribute
Set the attribute.- Specified by:
setAttribute
in interfaceServletContext
- Parameters:
name
- the attribute name.value
- the attribute value.
-
setClassLoader
Set the class-loader.- Specified by:
setClassLoader
in interfaceWebApplication
- Parameters:
classLoader
- the class loader.
-
setContextPath
Set the context path.- Specified by:
setContextPath
in interfaceWebApplication
- Parameters:
contextPath
- the context path.
-
setDefaultServlet
Description copied from interface:WebApplication
Set the default servlet.- Specified by:
setDefaultServlet
in interfaceWebApplication
- Parameters:
defaultServlet
- the default servlet.- See Also:
WebApplication.setDefaultServlet(jakarta.servlet.Servlet)
-
setDenyUncoveredHttpMethods
public void setDenyUncoveredHttpMethods(boolean denyUncoveredHttpMethods)Set if we are denying uncovered HTTP methods.- Specified by:
setDenyUncoveredHttpMethods
in interfaceWebApplication
- Parameters:
denyUncoveredHttpMethods
- the boolean value.
-
setDistributable
public void setDistributable(boolean distributable)Set if the web application is distributable.- Specified by:
setDistributable
in interfaceWebApplication
- Parameters:
distributable
- the boolean value.
-
setHttpSessionManager
Set the HTTP session manager.- Specified by:
setHttpSessionManager
in interfaceWebApplication
- Parameters:
httpSessionManager
- the HTTP session manager.
-
getHttpRequestManager
Description copied from interface:WebApplication
Returns the HttpRequestManager.- Specified by:
getHttpRequestManager
in interfaceWebApplication
- Returns:
- the HttpRequestManager
-
setHttpRequestManager
Description copied from interface:WebApplication
Set the HTTP request manager.- Specified by:
setHttpRequestManager
in interfaceWebApplication
- Parameters:
httpRequestManager
- the HTTP request manager.
-
setInitParameter
Set the init parameter.- Specified by:
setInitParameter
in interfaceServletContext
- Parameters:
name
- the name.value
- the value.- Returns:
- true if it could be set, false otherwise.
-
setJspManager
Set the JSP manager.- Specified by:
setJspManager
in interfaceWebApplication
- Parameters:
jspManager
- the JSP manager.
-
setLoggingManager
Set the logging manager.- Specified by:
setLoggingManager
in interfaceWebApplication
- Parameters:
loggingManager
- the logging manager.
-
setMimeTypeManager
Set the mimeType manager.- Specified by:
setMimeTypeManager
in interfaceWebApplication
- Parameters:
mimeTypeManager
- the mimeType manager.
-
setMultiPartManager
Set the multi part manager.- Specified by:
setMultiPartManager
in interfaceWebApplication
- Parameters:
multiPartManager
- the multi part manager.
-
setObjectInstanceManager
Set the object instance manager.- Specified by:
setObjectInstanceManager
in interfaceWebApplication
- Parameters:
objectInstanceManager
- the object instance manager.
-
setRequestCharacterEncoding
Set the default request character encoding.- Specified by:
setRequestCharacterEncoding
in interfaceServletContext
- Parameters:
requestCharacterEncoding
- the default request character encoding.
-
setResourceManager
Set the resource manager.- Specified by:
setResourceManager
in interfaceWebApplication
- Parameters:
resourceManager
- the resource manager.
-
setResponseCharacterEncoding
Set the default response character encoding.- Specified by:
setResponseCharacterEncoding
in interfaceServletContext
- Parameters:
responseCharacterEncoding
- the default response character encoding.
-
setSecurityManager
Set the security manager.- Specified by:
setSecurityManager
in interfaceWebApplication
- Parameters:
securityManager
- the security manager.
-
setServletContextName
Set the servlet context name.- Specified by:
setServletContextName
in interfaceWebApplication
- Parameters:
servletContextName
- the servlet context name.
-
setSessionTrackingModes
Set the session tracking modes.- Specified by:
setSessionTrackingModes
in interfaceServletContext
- Parameters:
sessionTrackingModes
- the session tracking modes.
-
setSessionTimeout
public void setSessionTimeout(int sessionTimeout)Set the default session timeout.- Specified by:
setSessionTimeout
in interfaceServletContext
- Parameters:
sessionTimeout
- the default session timeout.
-
setVirtualServerName
Set the virtual server name.- Parameters:
virtualServerName
- the virtual server name.
-
setWebApplicationRequestMapper
public void setWebApplicationRequestMapper(WebApplicationRequestMapper webApplicationRequestMapper)Set the web application request mapper.- Specified by:
setWebApplicationRequestMapper
in interfaceWebApplication
- Parameters:
webApplicationRequestMapper
- the web application request mapper.
-
setWelcomeFileManager
Set the welcome file manager.- Specified by:
setWelcomeFileManager
in interfaceWebApplication
- Parameters:
welcomeFileManager
- the welcome file manager.
-
start
public void start()Start servicing.- Specified by:
start
in interfaceWebApplication
-
stop
public void stop()Stop servicing.- Specified by:
stop
in interfaceWebApplication
-
unlinkRequestAndResponse
Unlink the request and response.- Specified by:
unlinkRequestAndResponse
in interfaceWebApplication
- Parameters:
request
- the request.response
- the response.
-
getLocaleEncodingManager
Description copied from interface:WebApplication
Returns the locale encoding manager.- Specified by:
getLocaleEncodingManager
in interfaceWebApplication
- Returns:
- the locale encoding manager
-
setLocaleEncodingManager
Description copied from interface:WebApplication
Set the locale encoding manager- Specified by:
setLocaleEncodingManager
in interfaceWebApplication
- Parameters:
localeEncodingManager
- the locale encoding manager
-
getRequestDispatcher
Returns the request dispatcher.- Specified by:
getRequestDispatcher
in interfaceServletContext
- Parameters:
path
- the path.- Returns:
- the request dispatcher
-
getNamedDispatcher
Get the name request dispatcher.- Specified by:
getNamedDispatcher
in interfaceServletContext
- Parameters:
name
- the name.- Returns:
- the request dispatcher.
-
getAsyncManager
Returns the async manager.- Specified by:
getAsyncManager
in interfaceWebApplication
- Returns:
- the async manager
-
verifyState
Verify the web application state.- Parameters:
desiredStatus
- the desired status.message
- the message.
-
getNamingManager
Description copied from interface:WebApplication
Returns the naming manager.- Specified by:
getNamingManager
in interfaceWebApplication
- Returns:
- the naming manager
-
getPolicyManager
Description copied from interface:WebApplication
Returns the policy manager.- Specified by:
getPolicyManager
in interfaceWebApplication
- Returns:
- the policy manager
-
setNamingManager
Description copied from interface:WebApplication
Set the naming manager.- Specified by:
setNamingManager
in interfaceWebApplication
- Parameters:
namingManager
- the naming manager.
-