Package com.sun.enterprise.web
Class WebModule
- java.lang.Object
-
- org.apache.catalina.core.ContainerBase
-
- org.apache.catalina.core.StandardContext
-
- com.sun.enterprise.web.pwc.PwcWebModule
-
- com.sun.enterprise.web.WebModule
-
- All Implemented Interfaces:
jakarta.servlet.ServletContext,Container,Context,Lifecycle,Pipeline,Context
- Direct Known Subclasses:
AdHocWebModule,ContextFacade
public class WebModule extends PwcWebModule implements Context
Class representing a web module for use by the Application Server.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.catalina.core.StandardContext
StandardContext.RestrictedServletContextListener
-
Nested classes/interfaces inherited from class org.apache.catalina.core.ContainerBase
ContainerBase.ContainerBackgroundProcessor, ContainerBase.PrivilegedAddChild
-
-
Field Summary
Fields Modifier and Type Field Description protected Object[]cachedFindsCached findXXX resultsprotected static ResourceBundlerb-
Fields inherited from class com.sun.enterprise.web.pwc.PwcWebModule
_id, defaultCharset, formHintField, webSessionCookieConfig
-
Fields inherited from class org.apache.catalina.core.StandardContext
allowLinking, cacheMaxSize, cacheTTL, caseSensitive, caseSensitiveMapping, context, contextListeners, directoryDeployed, directoryListing, filterRegisMap, isJsfApplication, servletRegisMap, servletReloadCheckSecs, showArchivedRealPathEnabled, urlEncoder
-
Fields inherited from class org.apache.catalina.core.ContainerBase
backgroundProcessorDelay, checkIfRequestIsSecure, children, controller, debug, domain, hasCustomPipeline, initialized, lifecycle, listeners, loader, log, manager, name, notifyContainerListeners, oname, parent, parentClassLoader, pipeline, readLock, realm, resources, started, support, writeLock
-
Fields inherited from interface org.apache.catalina.Container
ADD_CHILD_EVENT, ADD_MAPPER_EVENT, ADD_VALVE_EVENT, REMOVE_CHILD_EVENT, REMOVE_MAPPER_EVENT, REMOVE_VALVE_EVENT
-
Fields inherited from interface org.apache.catalina.Context
RELOAD_EVENT
-
Fields inherited from interface org.apache.catalina.Lifecycle
AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, INIT_EVENT, START_EVENT, STOP_EVENT
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAdHocValve(GlassFishValve valve)Adds the given valve to this web module's ad-hoc pipeline.protected voidaddCatalinaListener(String listenerName)Adds the Catalina listener with the given class name to this WebModule.protected voidaddValve(String className)Instantiates a Valve from the given className and adds it to the Pipeline of this WebModule.protected voidaddValve(Valve valveDescriptor)Constructs a Valve from the given valveDescriptor and adds it to the Pipeline of this WebModule.voidafterServiceEvent(String servletName, int status)voidbeforeServiceEvent(String servletName)protected voidcallServletContainerInitializers()protected voidconfigureCatalinaProperties()Configure theWebModuleprotected voidconfigureCatalinaProperties(String propName, String propValue)Configure theWebModuleprotected voidconfigureSessionSettings(WebBundleDescriptor wbd, WebModuleConfig wmInfo)Create and configure the session manager for this web application according to the persistence type specified.protected voidconfigureValves()Configure theWebModulevalves.protected voidcontextListenerStart()Notifies all ServletContextListeners at their contextInitialized method.protected ServletRegistrationImplcreateDynamicServletRegistrationImpl(StandardWrapper wrapper)protected <T extends jakarta.servlet.Filter>
TcreateFilterInstance(Class<T> clazz)Instantiates the given Filter class.<T extends jakarta.servlet.http.HttpUpgradeHandler>
TcreateHttpUpgradeHandlerInstance(Class<T> clazz)Create an instance of a given class.<T extends EventListener>
TcreateListenerInstance(Class<T> clazz)Instantiates the given EventListener class.ObjectInputStreamcreateObjectInputStream(InputStream is)Creates an ObjectInputStream that provides special deserialization logic for classes that are normally not serializable (such as javax.naming.Context).ObjectOutputStreamcreateObjectOutputStream(OutputStream os)Creates an ObjectOutputStream that provides special serialization logic for classes that are normally not serializable (such as javax.naming.Context).protected <T extends jakarta.servlet.Servlet>
TcreateServletInstance(Class<T> clazz)Instantiates the given Servlet class.protected ServletRegistrationImplcreateServletRegistrationImpl(StandardWrapper wrapper)voiddeclareRoles(String... roleNames)PipelinegetAdHocPipeline()Gets this web module's ad-hoc pipeline.StringgetAdHocServletName(String path)Returns the name of the ad-hoc servlet responsible for servicing the given path.ApplicationgetBean()Object[]getCachedFindOperation()Return the cached result of doing findXX on this object NOTE: this method MUST be used only when loading/using the content of default-web.xmlStringgetComponentId()Gets ComponentId for Invocation.StringgetFileEncoding()Gets the file encoding of all static resources of this web module.SunWebAppImplgetIasWebAppConfigBean()gets the sun-web.xml config beanLocaleCharsetMap[]getLocaleCharsetMap()return locale-charset-mapStringgetMonitoringNodeName()SecurityConfiggetSecurityConfig()Gets the security related configuration for this contextServerContextgetServerContext()Gets ServerContext.protected org.glassfish.hk2.classmodel.reflect.TypesgetTypes()longgetUniqueId()WebBundleDescriptorgetWebBundleDescriptor()Gets the WebBundleDesciptor (web.xml) for this WebModule.WebContainergetWebContainer()Gets the web container in which this web module was loaded.WebModuleConfiggetWebModuleConfig()booleanhasAdHocPaths()Indicates whether this web module contains any ad-hoc paths.booleanhasAdHocSubtrees()Indicates whether this web module contains any ad-hoc subtrees.booleanhasBeenXmlConfigured()Returntrueif the default=web.xml has been read for this module.booleanhasLocaleToCharsetMapping()Returns true if this web module specifies a locale-charset-map in its sun-web.xml, false otherwise.protected booleanisStandalone()protected EventListenerloadListener(ClassLoader loader, String listenerClassName)Loads and instantiates the listener with the specified classname.StringmapLocalesToCharset(Enumeration locales)Matches the given request locales against the charsets specified in the locale-charset-map of this web module's sun-web.xml, and returns the first matching charset.voidremoveAdHocValve(GlassFishValve valve)Removes the given valve from this web module's ad-hoc pipeline.protected voidremovePatternFromServlet(Wrapper wrapper, String pattern)This method is overridden in web-glue to also remove the given mapping from the deployment backend's WebBundleDescriptor.voidservletDestroyedEvent(String servletName)voidservletInitializedEvent(String servletName)voidsessionActivatedEndEvent(jakarta.servlet.http.HttpSession session)Trigger for monitoringvoidsessionActivatedStartEvent(jakarta.servlet.http.HttpSession session)Trigger for monitoringvoidsessionCreatedEvent(jakarta.servlet.http.HttpSession session)Trigger for monitoringvoidsessionDestroyedEvent(jakarta.servlet.http.HttpSession session)Trigger for monitoringvoidsessionExpiredEvent(jakarta.servlet.http.HttpSession session)Trigger for monitoringvoidsessionPassivatedEndEvent(jakarta.servlet.http.HttpSession session)Trigger for monitoringvoidsessionPassivatedStartEvent(jakarta.servlet.http.HttpSession session)Trigger for monitoringvoidsessionPersistedEndEvent(jakarta.servlet.http.HttpSession session)Trigger for monitoringvoidsessionPersistedStartEvent(jakarta.servlet.http.HttpSession session)Trigger for monitoringvoidsessionRejectedEvent(int maxSessions)Trigger for monitoringvoidsetBean(Application bean)voidsetCachedFindOperation(Object[] cachedFinds)Cache the result of doing findXX on this object NOTE: this method MUST be used only when loading/using the content of default-web.xmlvoidsetFileEncoding(String enc)Sets the file encoding of all static resources of this web module.voidsetI18nInfo()Sets the parameter encoding (i18n) info from web.xml, sun-web.xml, glassfish-web.xml and payara-web.xml.voidsetIasWebAppConfigBean(SunWebAppImpl iasBean)set the sun-web.xml config beanvoidsetParent(Container container)Sets the virtual server parent of this web module, and passes it on to this web module's realm adapter..voidsetRealm(Realm realm)Set the Realm with which this Container is associated.voidsetSecurityConfig(SecurityConfig config)Set the security related configuration for this contextvoidsetWebContainer(WebContainer webContainer)Sets the web container in which this web module was loaded.voidsetWebModuleConfig(WebModuleConfig wmInfo)voidsetXmlConfigured(boolean hasBeenXmlConfigured)Set totruewhen the default-web.xml has been read for this module.voidstart()Starts this web module.voidstop()Stops this web module.voidwebModuleStartedEvent()voidwebModuleStoppedEvent()-
Methods inherited from class com.sun.enterprise.web.pwc.PwcWebModule
createWrapper, getCacheControls, getContextRoot, getDefaultCharset, getEncodeCookies, getEndpointAddresses, getFormHintField, getHasWebServices, getID, getModuleName, getResponseCTForHeaders, getSessionCookieConfig, getSessionCookieConfigFromSunWebXml, getSTMPoolSize, hasWebXml, setCacheControls, setContextRoot, setEncodeCookies, setEndpointAddresses, setHasWebServices, setHasWebXml, setID, setModuleName, setResponseCTForHeaders, setSessionCookieConfigFromSunWebXml, setSTMPoolSize
-
Methods inherited from class org.apache.catalina.core.StandardContext
addAlternateDocBase, addApplicationListener, addApplicationParameter, addChild, addChild, addConstraint, addEjb, addEnvironment, addEnvironment, addErrorPage, addFilter, addFilter, addFilter, addFilterDef, addFilterDef, addFilterMap, addFilterMap, addFilterMaps, addInstanceListener, addInstanceListener, addJspFile, addJspMapping, addListener, addListener, addListener, addLocaleEncodingMappingParameter, addLocalEjb, addMessageDestination, addMessageDestinationRef, addMimeMapping, addParameter, addResource, addResource, addResourceEnvRef, addResourceLink, addResourceLink, addResourceParams, addRoleMapping, addSecurityRole, addServlet, addServlet, addServlet, addServlet, addServlet, addServletMapping, addServletMapping, addServletMapping, addServletMapping, addWatchedResource, addWelcomeFile, addWrapperLifecycle, addWrapperListener, adjustURLPattern, alternateResourcesStart, alternateResourcesStop, backgroundProcess, create, createFilter, createListener, createLoader, createObjectName, createObjectName, createObjectName, createObjectName, createServlet, destroy, engineBase, filterStart, filterStop, findApplicationParameters, findEjb, findEjbs, findEnvironment, findEnvironments, findErrorPage, findErrorPage, findFilterConfig, findFilterDef, findFilterDefs, findFilterMaps, findInstanceListeners, findLocalEjb, findLocalEjbs, findMappingObject, findMessageDestination, findMessageDestinationRef, findMessageDestinationRefs, findMessageDestinations, findMimeMapping, findMimeMappings, findParameter, findParameters, findResource, findResourceEnvRef, findResourceEnvRefs, findResourceLink, findResourceLinks, findResources, findRoleMapping, findServletMapping, findServletMappings, findStaticResources, findStatusPage, findStatusPages, findWelcomeFile, findWelcomeFiles, findWrapperLifecycles, findWrapperListeners, fireRequestDestroyedEvent, fireRequestInitializedEvent, getAllowRelativeRedirect, getAltDDName, getAlternateDocBases, getAntiJARLocking, getApplicationEventListeners, getAttribute, getAttributeNames, getAuditors, getAuthenticator, getAvailable, getCacheMaxSize, getCacheTTL, getCharsetMapper, getCharsetMapperClass, getClassLoader, getCompilerClasspath, getConfigFile, getConfigured, getConstraints, getContext, getContextPath, getCookies, getCrossContext, getDefaultConfigFile, getDefaultErrorPage, getDefaultSessionTrackingModes, getDefaultWebXml, getDelegate, getDisplayName, getDistributable, getDocBase, getEffectiveMajorVersion, getEffectiveMinorVersion, getEffectiveSessionTrackingModes, getEncodedPath, getEngineName, getEnvironments, getFilterRegistration, getFilterRegistrations, getHostname, getInfo, getInitParameter, getInitParameterNames, getJ2EEApplication, getJ2EEServer, getJspConfigDescriptor, getJvmRoute, getLoginConfig, getMajorVersion, getManagerChecksFrequency, getMapper, getMimeType, getMinorVersion, getNamedDispatcher, getNamingContextName, getNamingResources, getOriginalDocBase, getOverride, getParentName, getPath, getPaused, getPrivileged, getPublicId, getRealPath, getReloadable, getRequestCharacterEncoding, getRequestDispatcher, getResource, getResourceAsStream, getResourceLinks, getResourceNames, getResourcePaths, getResponseCharacterEncoding, getReuseSessionID, getServerInfo, getServletContext, getServletContextName, getServletNameFilterMappings, getServletRegistration, getServletRegistrations, getSessionCookieName, getSessionListeners, getSessionParameterName, getSessionTimeout, getStartTimeMillis, getStartupTime, getState, getStaticResources, getTldNamespaceAware, getTldScanTime, getTldValidation, getUnloadDelay, getUnpackWAR, getUrlPatternFilterMappings, getVirtualServerName, getWatchedResources, getWelcomeFiles, getWorkDir, getWorkPath, getXmlNamespaceAware, getXmlValidation, hasConstraints, hasFilter, hasSecurityRole, hasServlet, hasWatchedResources, init, isAllowLinking, isCachingAllowed, isCaseSensitive, isCaseSensitiveMapping, isDirectoryListing, isEmbedded, isEnableURLRewriting, isEventProvider, isFilesystemBased, isJsfApplication, isReload, isReplaceWelcomeFiles, isSecurePagesWithPragma, isServlet22, isSessionTimeoutOveridden, isStatisticsProvider, isUseMyFaces, isUseNaming, loadOnStartup, log, log, managerStart, managerStop, reload, removeApplicationParameter, removeAttribute, removeChild, removeConstraints, removeEjb, removeEnvironment, removeErrorPages, removeFilterDef, removeFilterMaps, removeInstanceListener, removeLocalEjb, removeMessageDestination, removeMessageDestinationRef, removeMimeMapping, removeParameter, removeResource, removeResourceEnvRef, removeResourceLink, removeRoleMapping, removeSecurityRoles, removeServletMapping, removeWatchedResources, removeWelcomeFiles, removeWrapperLifecycles, removeWrapperListeners, resourcesStart, resourcesStop, restrictedSetPipeline, sendNotification, setAllowLinking, setAllowRelativeRedirect, setAltDDName, setAntiJARLocking, setAttribute, setAuditors, setAvailable, setCacheMaxSize, setCacheTTL, setCachingAllowed, setCaseSensitive, setCaseSensitiveMapping, setCharsetMapper, setCharsetMapperClass, setCompilerClasspath, setConfigFile, setConfigured, setCookies, setCrossContext, setDefaultWebXml, setDelegate, setDirectoryListing, setDisplayName, setDistributable, setDocBase, setEffectiveMajorVersion, setEffectiveMinorVersion, setEmbedded, setEnableURLRewriting, setEngineName, setInitParameter, setJ2EEApplication, setJ2EEServer, setJspConfigDescriptor, setJvmRoute, setLoginConfig, setManagerChecksFrequency, setName, setNamingResources, setOrderedLibs, setOriginalDocBase, setOverride, setPath, setPrivileged, setPublicId, setReload, setReloadable, setReplaceWelcomeFiles, setRequestCharacterEncoding, setResources, setResponseCharacterEncoding, setReuseSessionID, setSecurePagesWithPragma, setServletContainerInitializerInterestList, setSessionTimeout, setSessionTrackingModes, setStartupTime, setTldNamespaceAware, setTldScanTime, setTldValidation, setUnloadDelay, setUnpackWAR, setUseMyFaces, setUseNaming, setWorkDir, setXmlNamespaceAware, setXmlValidation, startRecursive, stop, toString, validateURLPattern
-
Methods inherited from class org.apache.catalina.core.ContainerBase
addContainerListener, addLifecycleListener, addPropertyChangeListener, addValve, addValve, findChild, findChildren, findContainerListeners, findLifecycleListeners, fireContainerEvent, getBackgroundProcessorDelay, getBasic, getChildren, getContainerSuffix, getDebug, getDomain, getJmxName, getLoader, getLogger, getManager, getMappingObject, getName, getObjectName, getParent, getParentClassLoader, getPipeline, getRealm, getResources, getValveObjectNames, getValves, hasCustomPipeline, hasNonBasicValves, invoke, isCheckIfRequestIsSecure, logName, removeContainerListener, removeLifecycleListener, removeLifecycleListeners, removePropertyChangeListener, removeValve, setBackgroundProcessorDelay, setBasic, setCheckIfRequestIsSecure, setDebug, setDomain, setLoader, setLogger, setManager, setParentClassLoader, startChildren, threadStart, threadStop
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.catalina.Container
addContainerListener, addPropertyChangeListener, findChild, findChildren, findContainerListeners, fireContainerEvent, getBackgroundProcessorDelay, getLoader, getLogger, getManager, getMappingObject, getName, getParent, getParentClassLoader, getPipeline, getRealm, getResources, hasCustomPipeline, invoke, isCheckIfRequestIsSecure, removeContainerListener, removePropertyChangeListener, setBackgroundProcessorDelay, setCheckIfRequestIsSecure, setLoader, setLogger, setManager, setParentClassLoader
-
Methods inherited from interface org.glassfish.embeddable.web.Context
addListener, addListener, getPath, isDirectoryListing, setDefaultWebXml, setDirectoryListing, setPath
-
Methods inherited from interface jakarta.servlet.ServletContext
addFilter, addFilter, addFilter, addJspFile, addListener, addServlet, addServlet, addServlet, createFilter, createListener, createServlet, getAttribute, getAttributeNames, getClassLoader, getContext, getContextPath, getDefaultSessionTrackingModes, getEffectiveMajorVersion, getEffectiveMinorVersion, getEffectiveSessionTrackingModes, getFilterRegistration, getFilterRegistrations, getInitParameter, getInitParameterNames, getJspConfigDescriptor, getMajorVersion, getMimeType, getMinorVersion, getNamedDispatcher, getRealPath, getRequestCharacterEncoding, getRequestDispatcher, getResource, getResourceAsStream, getResourcePaths, getResponseCharacterEncoding, getServerInfo, getServletContextName, getServletRegistration, getServletRegistrations, getSessionCookieConfig, getSessionTimeout, getVirtualServerName, log, log, removeAttribute, setAttribute, setInitParameter, setRequestCharacterEncoding, setResponseCharacterEncoding, setSessionTimeout, setSessionTrackingModes
-
-
-
-
Field Detail
-
rb
protected static final ResourceBundle rb
-
cachedFinds
protected Object[] cachedFinds
Cached findXXX results
-
-
Method Detail
-
setIasWebAppConfigBean
public void setIasWebAppConfigBean(SunWebAppImpl iasBean)
set the sun-web.xml config bean
-
getIasWebAppConfigBean
public SunWebAppImpl getIasWebAppConfigBean()
gets the sun-web.xml config bean
-
getWebContainer
public WebContainer getWebContainer()
Gets the web container in which this web module was loaded.- Returns:
- the web container in which this web module was loaded
-
setWebContainer
public void setWebContainer(WebContainer webContainer)
Sets the web container in which this web module was loaded.
-
setWebModuleConfig
public void setWebModuleConfig(WebModuleConfig wmInfo)
-
getWebModuleConfig
public WebModuleConfig getWebModuleConfig()
-
getMonitoringNodeName
public String getMonitoringNodeName()
-
setI18nInfo
public void setI18nInfo()
Sets the parameter encoding (i18n) info from web.xml, sun-web.xml, glassfish-web.xml and payara-web.xml.
-
getLocaleCharsetMap
public LocaleCharsetMap[] getLocaleCharsetMap()
return locale-charset-map
-
hasLocaleToCharsetMapping
public boolean hasLocaleToCharsetMapping()
Returns true if this web module specifies a locale-charset-map in its sun-web.xml, false otherwise.- Specified by:
hasLocaleToCharsetMappingin classPwcWebModule- Returns:
- true if this web module specifies a locale-charset-map in its sun-web.xml, false otherwise
-
mapLocalesToCharset
public String mapLocalesToCharset(Enumeration locales)
Matches the given request locales against the charsets specified in the locale-charset-map of this web module's sun-web.xml, and returns the first matching charset.- Specified by:
mapLocalesToCharsetin classPwcWebModule- Parameters:
locales- Request locales- Returns:
- First matching charset, or null if this web module does not specify any locale-charset-map in its sun-web.xml, or no match was found
-
createObjectInputStream
public ObjectInputStream createObjectInputStream(InputStream is) throws IOException
Creates an ObjectInputStream that provides special deserialization logic for classes that are normally not serializable (such as javax.naming.Context).- Overrides:
createObjectInputStreamin classStandardContext- Throws:
IOException
-
createObjectOutputStream
public ObjectOutputStream createObjectOutputStream(OutputStream os) throws IOException
Creates an ObjectOutputStream that provides special serialization logic for classes that are normally not serializable (such as javax.naming.Context).- Overrides:
createObjectOutputStreamin classStandardContext- Returns:
- Throws:
IOException
-
setXmlConfigured
public void setXmlConfigured(boolean hasBeenXmlConfigured)
Set totruewhen the default-web.xml has been read for this module.
-
hasBeenXmlConfigured
public boolean hasBeenXmlConfigured()
Returntrueif the default=web.xml has been read for this module.
-
setCachedFindOperation
public void setCachedFindOperation(Object[] cachedFinds)
Cache the result of doing findXX on this object NOTE: this method MUST be used only when loading/using the content of default-web.xml
-
getCachedFindOperation
public Object[] getCachedFindOperation()
Return the cached result of doing findXX on this object NOTE: this method MUST be used only when loading/using the content of default-web.xml
-
setRealm
public void setRealm(Realm realm)
Description copied from class:ContainerBaseSet the Realm with which this Container is associated.- Specified by:
setRealmin interfaceContainer- Overrides:
setRealmin classContainerBase- Parameters:
realm- The newly associated Realm
-
start
public void start() throws LifecycleExceptionStarts this web module.- Specified by:
startin interfaceLifecycle- Overrides:
startin classStandardContext- Throws:
LifecycleException- if a startup error occurs
-
stop
public void stop() throws LifecycleExceptionStops this web module.- Specified by:
stopin interfaceLifecycle- Overrides:
stopin classStandardContext- Throws:
LifecycleException- if a shutdown error occurs
-
contextListenerStart
protected void contextListenerStart()
Description copied from class:StandardContextNotifies all ServletContextListeners at their contextInitialized method.- Overrides:
contextListenerStartin classStandardContext
-
getTypes
protected org.glassfish.hk2.classmodel.reflect.Types getTypes()
- Overrides:
getTypesin classStandardContext
-
callServletContainerInitializers
protected void callServletContainerInitializers() throws LifecycleException- Overrides:
callServletContainerInitializersin classStandardContext- Throws:
LifecycleException
-
setParent
public void setParent(Container container)
Sets the virtual server parent of this web module, and passes it on to this web module's realm adapter..- Specified by:
setParentin interfaceContainer- Overrides:
setParentin classContainerBase- Parameters:
container- The virtual server parent
-
hasAdHocPaths
public boolean hasAdHocPaths()
Indicates whether this web module contains any ad-hoc paths. An ad-hoc path is a servlet path that is mapped to a servlet not declared in the web module's deployment descriptor. A web module all of whose mappings are for ad-hoc paths is called an ad-hoc web module.- Specified by:
hasAdHocPathsin interfaceContext- Overrides:
hasAdHocPathsin classStandardContext- Returns:
- true if this web module contains any ad-hoc paths, false otherwise
-
hasAdHocSubtrees
public boolean hasAdHocSubtrees()
Indicates whether this web module contains any ad-hoc subtrees.- Returns:
- true if this web module contains any ad-hoc subtrees, false otherwise
-
getAdHocServletName
public String getAdHocServletName(String path)
Returns the name of the ad-hoc servlet responsible for servicing the given path.- Specified by:
getAdHocServletNamein interfaceContext- Overrides:
getAdHocServletNamein classStandardContext- Parameters:
path- The path whose associated ad-hoc servlet is needed- Returns:
- The name of the ad-hoc servlet responsible for servicing the given path, or null if the given path does not represent an ad-hoc path
-
addAdHocValve
public void addAdHocValve(GlassFishValve valve)
Adds the given valve to this web module's ad-hoc pipeline.- Parameters:
valve- The valve to add
-
removeAdHocValve
public void removeAdHocValve(GlassFishValve valve)
Removes the given valve from this web module's ad-hoc pipeline.- Parameters:
valve- The valve to remove
-
getAdHocPipeline
public Pipeline getAdHocPipeline()
Gets this web module's ad-hoc pipeline.- Returns:
- This web module's ad-hoc pipeline
-
setFileEncoding
public void setFileEncoding(String enc)
Sets the file encoding of all static resources of this web module.- Parameters:
enc- The file encoding of static resources of this web module
-
getFileEncoding
public String getFileEncoding()
Gets the file encoding of all static resources of this web module.- Returns:
- The file encoding of static resources of this web module
-
configureValves
protected void configureValves()
Configure theWebModulevalves.
-
configureCatalinaProperties
protected void configureCatalinaProperties()
Configure theWebModule-
configureCatalinaProperties
protected void configureCatalinaProperties(String propName, String propValue)
Configure theWebModule- Parameters:
propName- the property namepropValue- the property value
-
addValve
protected void addValve(String className)
Instantiates a Valve from the given className and adds it to the Pipeline of this WebModule.- Parameters:
className- the fully qualified class name of the Valve
-
addValve
protected void addValve(Valve valveDescriptor)
Constructs a Valve from the given valveDescriptor and adds it to the Pipeline of this WebModule.- Parameters:
valveDescriptor- the object containing the information to create the valve.
-
addCatalinaListener
protected void addCatalinaListener(String listenerName)
Adds the Catalina listener with the given class name to this WebModule.- Parameters:
listenerName- The fully qualified class name of the listener
-
getBean
public Application getBean()
-
setBean
public void setBean(Application bean)
-
isStandalone
protected boolean isStandalone()
- Overrides:
isStandalonein classStandardContext
-
getWebBundleDescriptor
public WebBundleDescriptor getWebBundleDescriptor()
Gets the WebBundleDesciptor (web.xml) for this WebModule.
-
getComponentId
public String getComponentId()
Gets ComponentId for Invocation.
-
getServerContext
public ServerContext getServerContext()
Gets ServerContext.
-
loadListener
protected EventListener loadListener(ClassLoader loader, String listenerClassName) throws Exception
Loads and instantiates the listener with the specified classname.- Overrides:
loadListenerin classStandardContext- Parameters:
loader- the classloader to uselistenerClassName- the fully qualified classname to instantiate- Returns:
- the instantiated listener
- Throws:
Exception- if the specified classname fails to be loaded or instantiated
-
configureSessionSettings
protected void configureSessionSettings(WebBundleDescriptor wbd, WebModuleConfig wmInfo)
Create and configure the session manager for this web application according to the persistence type specified. Also configure the other aspects of session management for this web application according to the values specified in the session-config element of sun-web.xml (and whether app is distributable)
-
createServletRegistrationImpl
protected ServletRegistrationImpl createServletRegistrationImpl(StandardWrapper wrapper)
- Overrides:
createServletRegistrationImplin classStandardContext
-
createDynamicServletRegistrationImpl
protected ServletRegistrationImpl createDynamicServletRegistrationImpl(StandardWrapper wrapper)
- Overrides:
createDynamicServletRegistrationImplin classStandardContext
-
removePatternFromServlet
protected void removePatternFromServlet(Wrapper wrapper, String pattern)
Description copied from class:StandardContextThis method is overridden in web-glue to also remove the given mapping from the deployment backend's WebBundleDescriptor.- Overrides:
removePatternFromServletin classStandardContext
-
createServletInstance
protected <T extends jakarta.servlet.Servlet> T createServletInstance(Class<T> clazz) throws Exception
Instantiates the given Servlet class.- Overrides:
createServletInstancein classStandardContext- Returns:
- the new Servlet instance
- Throws:
Exception
-
createFilterInstance
protected <T extends jakarta.servlet.Filter> T createFilterInstance(Class<T> clazz) throws Exception
Instantiates the given Filter class.- Overrides:
createFilterInstancein classStandardContext- Returns:
- the new Filter instance
- Throws:
Exception
-
createListenerInstance
public <T extends EventListener> T createListenerInstance(Class<T> clazz) throws Exception
Instantiates the given EventListener class.- Overrides:
createListenerInstancein classStandardContext- Returns:
- the new EventListener instance
- Throws:
Exception
-
createHttpUpgradeHandlerInstance
public <T extends jakarta.servlet.http.HttpUpgradeHandler> T createHttpUpgradeHandlerInstance(Class<T> clazz) throws Exception
Create an instance of a given class.- Overrides:
createHttpUpgradeHandlerInstancein classStandardContext- Parameters:
clazz-- Returns:
- an instance of the given class
- Throws:
Exception
-
servletInitializedEvent
public void servletInitializedEvent(String servletName)
-
servletDestroyedEvent
public void servletDestroyedEvent(String servletName)
-
beforeServiceEvent
public void beforeServiceEvent(String servletName)
-
afterServiceEvent
public void afterServiceEvent(String servletName, int status)
-
sessionCreatedEvent
public void sessionCreatedEvent(jakarta.servlet.http.HttpSession session)
Description copied from class:StandardContextTrigger for monitoring- Overrides:
sessionCreatedEventin classStandardContext- See Also:
SessionStatsProvider
-
sessionDestroyedEvent
public void sessionDestroyedEvent(jakarta.servlet.http.HttpSession session)
Description copied from class:StandardContextTrigger for monitoring
-
sessionRejectedEvent
public void sessionRejectedEvent(int maxSessions)
Description copied from class:StandardContextTrigger for monitoring- Overrides:
sessionRejectedEventin classStandardContext- See Also:
SessionStatsProvider.sessionRejectedEvent(int, java.lang.String, java.lang.String)
-
sessionExpiredEvent
public void sessionExpiredEvent(jakarta.servlet.http.HttpSession session)
Description copied from class:StandardContextTrigger for monitoring- Overrides:
sessionExpiredEventin classStandardContext- See Also:
SessionStatsProvider.sessionExpiredEvent(java.lang.String, java.lang.String, java.lang.String)
-
sessionPersistedStartEvent
public void sessionPersistedStartEvent(jakarta.servlet.http.HttpSession session)
Description copied from class:StandardContextTrigger for monitoring
-
sessionPersistedEndEvent
public void sessionPersistedEndEvent(jakarta.servlet.http.HttpSession session)
Description copied from class:StandardContextTrigger for monitoring
-
sessionActivatedStartEvent
public void sessionActivatedStartEvent(jakarta.servlet.http.HttpSession session)
Description copied from class:StandardContextTrigger for monitoring
-
sessionActivatedEndEvent
public void sessionActivatedEndEvent(jakarta.servlet.http.HttpSession session)
Description copied from class:StandardContextTrigger for monitoring
-
sessionPassivatedStartEvent
public void sessionPassivatedStartEvent(jakarta.servlet.http.HttpSession session)
Description copied from class:StandardContextTrigger for monitoring
-
sessionPassivatedEndEvent
public void sessionPassivatedEndEvent(jakarta.servlet.http.HttpSession session)
Description copied from class:StandardContextTrigger for monitoring
-
declareRoles
public void declareRoles(String... roleNames)
- Specified by:
declareRolesin interfacejakarta.servlet.ServletContext- Overrides:
declareRolesin classStandardContext
-
webModuleStartedEvent
public void webModuleStartedEvent()
-
webModuleStoppedEvent
public void webModuleStoppedEvent()
-
getSecurityConfig
public SecurityConfig getSecurityConfig()
Description copied from interface:ContextGets the security related configuration for this context- Specified by:
getSecurityConfigin interfaceContext- Returns:
- the security configuration for this context
- See Also:
SecurityConfig
-
setSecurityConfig
public void setSecurityConfig(SecurityConfig config)
Description copied from interface:ContextSet the security related configuration for this context- Specified by:
setSecurityConfigin interfaceContext- Parameters:
config- the security configuration for this context- See Also:
SecurityConfig
-
getUniqueId
public long getUniqueId()
- Overrides:
getUniqueIdin classStandardContext- Returns:
- 0
-
-
-