Package com.sun.enterprise.web.pwc
Class PwcWebModule
- java.lang.Object
-
- org.apache.catalina.core.ContainerBase
-
- org.apache.catalina.core.StandardContext
-
- com.sun.enterprise.web.pwc.PwcWebModule
-
-
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 String
_id
protected String
defaultCharset
protected String
formHintField
protected WebSessionCookieConfig
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, logger, manager, name, notifyContainerListeners, oname, parent, parentClassLoader, pipeline, rb, 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
-
-
Constructor Summary
Constructors Constructor Description PwcWebModule()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Wrapper
createWrapper()
Factory method to create and return a new Wrapper instance, of the Java implementation class appropriate for this Context implementation.String[]
getCacheControls()
Gets the Cache-Control settings of this web module.String
getContextRoot()
Gets this web module's context root.String
getDefaultCharset()
Gets the value of the default-charset attribute of the parameter-encoding elementboolean
getEncodeCookies()
return _encodeCookies property valueString[]
getEndpointAddresses()
Gets the URL addresses corresponding to the web services endpoints of this web module.String
getFormHintField()
return parameter-encoding form-hint-field attribute valueboolean
getHasWebServices()
Return the hasWebServices flag for this web module.String
getID()
Gets this web module's identifier.String
getModuleName()
Gets this web module's name.boolean
getResponseCTForHeaders()
return _useResponseCTForHeaders property valuejakarta.servlet.SessionCookieConfig
getSessionCookieConfig()
Gets the session tracking cookie configuration of this ServletContext.SessionCookieConfig
getSessionCookieConfigFromSunWebXml()
Return the session cookie configuration for this web module.int
getSTMPoolSize()
Return maximum number of instances that will be allocated when a single thread model servlet is used in this web module.abstract boolean
hasLocaleToCharsetMapping()
Returns true if this web module specifies a locale-charset-map in its sun-web.xml, false otherwise.boolean
hasWebXml()
abstract 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.void
setCacheControls(String[] cacheControls)
Sets the Cache-Control configuration for this web module.void
setContextRoot(String contextRoot)
Sets this web module's context root.void
setEncodeCookies(boolean flag)
Determines whether cookies should be encoded or not.void
setEndpointAddresses(String[] endpointAddresses)
Sets the URL addresses corresponding to the web services endpoints of this web module.void
setHasWebServices(boolean hasWebServices)
Set the hasWebServices boolean flag for this web module.void
setHasWebXml(boolean hasWebXml)
void
setID(String id)
Sets this web module's identifier.void
setModuleName(String moduleName)
Sets this web module's name.void
setResponseCTForHeaders()
sets _useResponseCTForHeaders property value.void
setSessionCookieConfigFromSunWebXml(SessionCookieConfig cookieConfig)
Set the session cookie configuration for this web module.void
setSTMPoolSize(int newPoolSize)
Set the maximum number of instances that will be allocated when a single thread model servlet is used in this web module.-
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, callServletContainerInitializers, contextListenerStart, create, createDynamicServletRegistrationImpl, createFilter, createFilterInstance, createHttpUpgradeHandlerInstance, createListener, createListenerInstance, createLoader, createObjectInputStream, createObjectName, createObjectName, createObjectName, createObjectName, createObjectOutputStream, createServlet, createServletInstance, createServletRegistrationImpl, declareRoles, 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, getAdHocServletName, 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, getServlet, getServletContext, getServletContextName, getServletNameFilterMappings, getServletNames, getServletRegistration, getServletRegistrations, getServlets, getSessionCookieName, getSessionListeners, getSessionParameterName, getSessionTimeout, getStartTimeMillis, getStartupTime, getState, getStaticResources, getTldNamespaceAware, getTldScanTime, getTldValidation, getTypes, getUniqueId, getUnloadDelay, getUnpackWAR, getUrlPatternFilterMappings, getVirtualServerName, getWatchedResources, getWelcomeFiles, getWorkDir, getWorkPath, getXmlNamespaceAware, getXmlValidation, hasAdHocPaths, hasConstraints, hasFilter, hasSecurityRole, hasServlet, hasWatchedResources, init, isAllowLinking, isCachingAllowed, isCaseSensitive, isCaseSensitiveMapping, isDirectoryListing, isEmbedded, isEnableURLRewriting, isEventProvider, isFilesystemBased, isJsfApplication, isReload, isReplaceWelcomeFiles, isSecurePagesWithPragma, isServlet22, isSessionTimeoutOveridden, isStandalone, isStatisticsProvider, isUseMyFaces, isUseNaming, loadListener, loadOnStartup, log, log, log, managerStart, managerStop, reload, removeApplicationParameter, removeAttribute, removeChild, removeConstraints, removeEjb, removeEnvironment, removeErrorPages, removeFilterDef, removeFilterMaps, removeInstanceListener, removeLocalEjb, removeMessageDestination, removeMessageDestinationRef, removeMimeMapping, removeParameter, removePatternFromServlet, removeResource, removeResourceEnvRef, removeResourceLink, removeRoleMapping, removeSecurityRoles, removeServletMapping, removeWatchedResources, removeWelcomeFiles, removeWrapperLifecycles, removeWrapperListeners, resourcesStart, resourcesStop, restrictedSetPipeline, sendNotification, sessionActivatedEndEvent, sessionActivatedStartEvent, sessionCreatedEvent, sessionDestroyedEvent, sessionExpiredEvent, sessionPassivatedEndEvent, sessionPassivatedStartEvent, sessionPersistedEndEvent, sessionPersistedStartEvent, sessionRejectedEvent, 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, start, startRecursive, stop, 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, setParent, setParentClassLoader, setRealm, 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, setParent, setParentClassLoader, setRealm
-
-
-
-
Field Detail
-
_id
protected String _id
-
formHintField
protected String formHintField
-
defaultCharset
protected String defaultCharset
-
webSessionCookieConfig
protected WebSessionCookieConfig webSessionCookieConfig
-
-
Method Detail
-
getID
public String getID()
Gets this web module's identifier.- Returns:
- Web module identifier
-
setID
public void setID(String id)
Sets this web module's identifier.- Parameters:
id
- Web module identifier
-
getSessionCookieConfig
public jakarta.servlet.SessionCookieConfig getSessionCookieConfig()
Gets the session tracking cookie configuration of this ServletContext.- Specified by:
getSessionCookieConfig
in interfaceContext
- Specified by:
getSessionCookieConfig
in interfacejakarta.servlet.ServletContext
- Overrides:
getSessionCookieConfig
in classStandardContext
- Returns:
- the session tracking cookie configuration of this ServletContext.
-
getSessionCookieConfigFromSunWebXml
public SessionCookieConfig getSessionCookieConfigFromSunWebXml()
Return the session cookie configuration for this web module.
-
setSessionCookieConfigFromSunWebXml
public void setSessionCookieConfigFromSunWebXml(SessionCookieConfig cookieConfig)
Set the session cookie configuration for this web module.- Parameters:
cookieConfig
- The new session cookie configuration
-
getFormHintField
public String getFormHintField()
return parameter-encoding form-hint-field attribute value
-
getDefaultCharset
public String getDefaultCharset()
Gets the value of the default-charset attribute of the parameter-encoding element- Returns:
- Value of the default-charset attribute of the parameter-encoding element, or null if not present
-
setResponseCTForHeaders
public void setResponseCTForHeaders()
sets _useResponseCTForHeaders property value. When _useResponseCTForHeaders is set to true, it means that we send the response header in the same encoding of the response charset instead of UTF-8, (see the method sendHeaders in com.sun.enterprise.web.connector.nsapi.nsapiNSAPIResponse)
-
setEncodeCookies
public void setEncodeCookies(boolean flag)
Determines whether cookies should be encoded or not. If the property encodeCookies is set to false in sun-web.xml, cookies will not be URL encoded. The default behaviuor is that we always encode the cookies unless the property encodeCookies is set to false in sun-web.xml.
-
getResponseCTForHeaders
public boolean getResponseCTForHeaders()
return _useResponseCTForHeaders property value
-
getEncodeCookies
public boolean getEncodeCookies()
return _encodeCookies property value
-
getSTMPoolSize
public int getSTMPoolSize()
Return maximum number of instances that will be allocated when a single thread model servlet is used in this web module.
-
setSTMPoolSize
public void setSTMPoolSize(int newPoolSize)
Set the maximum number of instances that will be allocated when a single thread model servlet is used in this web module.- Parameters:
newPoolSize
- New value of SingleThreadModel servlet pool size
-
createWrapper
public Wrapper createWrapper()
Factory method to create and return a new Wrapper instance, of the Java implementation class appropriate for this Context implementation. The constructor of the instantiated Wrapper will have been called, but no properties will have been set.- Specified by:
createWrapper
in interfaceContext
- Overrides:
createWrapper
in classStandardContext
-
getHasWebServices
public boolean getHasWebServices()
Return the hasWebServices flag for this web module.
-
setHasWebServices
public void setHasWebServices(boolean hasWebServices)
Set the hasWebServices boolean flag for this web module.- Parameters:
hasWebServices
- boolean flag hasWebServices for this web module
-
getEndpointAddresses
public String[] getEndpointAddresses()
Gets the URL addresses corresponding to the web services endpoints of this web module.- Returns:
- Array of URL addresses corresponding to the web services endpoints of this web module
-
setEndpointAddresses
public void setEndpointAddresses(String[] endpointAddresses)
Sets the URL addresses corresponding to the web services endpoints of this web module.- Parameters:
endpointAddresses
- Array of URL addresses corresponding to the web services endpoints of this web module
-
getContextRoot
public String getContextRoot()
Gets this web module's context root.- Returns:
- Web module context root
-
setContextRoot
public void setContextRoot(String contextRoot)
Sets this web module's context root.- Parameters:
contextRoot
- Web module context root
-
setHasWebXml
public void setHasWebXml(boolean hasWebXml)
-
hasWebXml
public boolean hasWebXml()
-
setModuleName
public void setModuleName(String moduleName)
Sets this web module's name.- Parameters:
moduleName
- Web module name
-
getModuleName
public String getModuleName()
Gets this web module's name.- Returns:
- Web module name
-
setCacheControls
public void setCacheControls(String[] cacheControls)
Sets the Cache-Control configuration for this web module.- Parameters:
cacheControls
- Cache-Control configuration settings for this web module
-
getCacheControls
public String[] getCacheControls()
Gets the Cache-Control settings of this web module.- Returns:
- Cache-Control settings of this web module, or null if no such settings exist for this web module.
-
hasLocaleToCharsetMapping
public abstract boolean hasLocaleToCharsetMapping()
Returns true if this web module specifies a locale-charset-map in its sun-web.xml, false otherwise.- Returns:
- true if this web module specifies a locale-charset-map in its sun-web.xml, false otherwise
-
mapLocalesToCharset
public abstract 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.- 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
-
-