Class WebAppContext
- java.lang.Object
-
- All Implemented Interfaces:
Handler
,HandlerContainer
,Attributes
,ClassVisibilityChecker
,Container
,Destroyable
,Dumpable
,Dumpable.DumpableContainer
,Graceful
,LifeCycle
,WebAppClassLoader.Context
@ManagedObject("Web Application ContextHandler") @Deprecated(since="2021-05-27") public class WebAppContext extends ServletContextHandler implements WebAppClassLoader.Context
Deprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.Web Application Context Handler.The WebAppContext handler is an extension of ContextHandler that coordinates the construction and configuration of nested handlers:
ConstraintSecurityHandler
,SessionHandler
andServletHandler
. The handlers are configured by pluggable configuration classes, with the default beingWebXmlConfiguration
andJettyWebXmlConfiguration
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
WebAppContext.Context
Deprecated.-
Nested classes/interfaces inherited from class org.eclipse.jetty.servlet.ServletContextHandler
ServletContextHandler.Decorator, ServletContextHandler.Initializer, ServletContextHandler.JspConfig, ServletContextHandler.JspPropertyGroup, ServletContextHandler.ServletContainerInitializerCaller, ServletContextHandler.TagLib
-
Nested classes/interfaces inherited from class org.eclipse.jetty.server.handler.ContextHandler
ContextHandler.AliasCheck, ContextHandler.ApproveAliases, ContextHandler.ApproveNonExistentDirectoryAliases, ContextHandler.Availability, ContextHandler.ContextScopeListener, ContextHandler.ContextStatus, ContextHandler.StaticContext
-
Nested classes/interfaces inherited from class org.eclipse.jetty.server.handler.AbstractHandler
AbstractHandler.ErrorDispatchHandler
-
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.Attributes
Attributes.Wrapper
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
Container.InheritedListener, Container.Listener
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainer
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Graceful
Graceful.Shutdown
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String[]
__dftServerClasses
Deprecated.static java.lang.String[]
__dftSystemClasses
Deprecated.static java.lang.String
BASETEMPDIR
Deprecated.static java.lang.String[]
DEFAULT_CONFIGURATION_CLASSES
Deprecated.static java.lang.String
ERROR_PAGE
Deprecated.static java.lang.String
SERVER_SRV_CLASSES
Deprecated.static java.lang.String
SERVER_SYS_CLASSES
Deprecated.static java.lang.String
TEMPDIR
Deprecated.static java.lang.String
WEB_DEFAULTS_XML
Deprecated.-
Fields inherited from class org.eclipse.jetty.servlet.ServletContextHandler
GZIP, NO_SECURITY, NO_SESSIONS, SECURITY, SESSIONS
-
Fields inherited from class org.eclipse.jetty.server.handler.ContextHandler
DEFAULT_LISTENER_TYPE_INDEX, DEFAULT_MAX_FORM_CONTENT_SIZE, DEFAULT_MAX_FORM_KEYS, EXTENDED_LISTENER_TYPE_INDEX, MANAGED_ATTRIBUTES, MAX_FORM_CONTENT_SIZE_KEY, MAX_FORM_KEYS_KEY, SERVLET_LISTENER_TYPES, SERVLET_MAJOR_VERSION, SERVLET_MINOR_VERSION
-
-
Constructor Summary
Constructors Constructor Description WebAppContext()
Deprecated.WebAppContext(java.lang.String webApp, java.lang.String contextPath)
Deprecated.WebAppContext(HandlerContainer parent, java.lang.String webApp, java.lang.String contextPath)
Deprecated.WebAppContext(HandlerContainer parent, java.lang.String contextPath, SessionHandler sessionHandler, SecurityHandler securityHandler, ServletHandler servletHandler, ErrorHandler errorHandler, int options)
Deprecated.This constructor is used in the geronimo integration.WebAppContext(HandlerContainer parent, Resource webApp, java.lang.String contextPath)
Deprecated.WebAppContext(SessionHandler sessionHandler, SecurityHandler securityHandler, ServletHandler servletHandler, ErrorHandler errorHandler)
Deprecated.This constructor is used in the geronimo integration.WebAppContext(Resource webApp, java.lang.String contextPath)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addOverrideDescriptor(java.lang.String overrideDescriptor)
Deprecated.The override descriptor is a web.xml format file that is applied to the context after the standard WEB-INF/web.xmlvoid
addServerClass(java.lang.String classOrPackageOrLocation)
Deprecated.static void
addServerClasses(Server server, java.lang.String... pattern)
Deprecated.void
addSystemClass(java.lang.String classOrPackage)
Deprecated.static void
addSystemClasses(Server server, java.lang.String... pattern)
Deprecated.void
configure()
Deprecated.void
destroy()
Deprecated.Destroys the managed Destroyable beans in the reverse order they were added.void
dump(java.lang.Appendable out, java.lang.String indent)
Deprecated.Dump this object (and children) into an Appendable using the provided indent after any new lines.java.lang.String[]
getConfigurationClasses()
Deprecated.Configuration[]
getConfigurations()
Deprecated.static WebAppContext
getCurrentWebAppContext()
Deprecated.static java.lang.String[]
getDefaultConfigurationClasses()
Deprecated.java.lang.String
getDefaultsDescriptor()
Deprecated.The default descriptor is a web.xml format file that is applied to the context before the standard WEB-INF/web.xmljava.lang.String[]
getDefaultServerClasses()
Deprecated.java.lang.String[]
getDefaultSystemClasses()
Deprecated.java.lang.String
getDescriptor()
Deprecated.java.lang.String
getExtraClasspath()
Deprecated.MetaData
getMetaData()
Deprecated.java.lang.String
getOverrideDescriptor()
Deprecated.The override descriptor is a web.xml format file that is applied to the context after the standard WEB-INF/web.xmljava.util.List<java.lang.String>
getOverrideDescriptors()
Deprecated.An override descriptor is a web.xml format file that is applied to the context after the standard WEB-INF/web.xmljava.security.PermissionCollection
getPermissions()
Deprecated.Resource
getResource(java.lang.String uriInContext)
Deprecated.java.lang.String
getResourceAlias(java.lang.String path)
Deprecated.java.util.Map<java.lang.String,java.lang.String>
getResourceAliases()
Deprecated.java.lang.String[]
getServerClasses()
Deprecated.ClasspathPattern
getServerClasspathPattern()
Deprecated.java.lang.String[]
getSystemClasses()
Deprecated.ClasspathPattern
getSystemClasspathPattern()
Deprecated.java.io.File
getTempDirectory()
Deprecated.java.lang.Throwable
getUnavailableException()
Deprecated.Get an exception that caused the webapp to be unavailablejava.lang.String
getWar()
Deprecated.Resource
getWebInf()
Deprecated.boolean
isAllowDuplicateFragmentNames()
Deprecated.boolean
isConfigurationDiscovered()
Deprecated.Is the context Automatically configured.boolean
isCopyWebDir()
Deprecated.boolean
isCopyWebInf()
Deprecated.boolean
isDistributable()
Deprecated.boolean
isExtractWAR()
Deprecated.boolean
isLogUrlOnStart()
Deprecated.boolean
isParentLoaderPriority()
Deprecated.boolean
isPersistTempDirectory()
Deprecated.boolean
isServerClass(java.lang.Class<?> clazz)
Deprecated.Is the class a Server Class.boolean
isServerClass(java.lang.String name)
Deprecated.boolean
isServerResource(java.lang.String name, java.net.URL parentUrl)
Deprecated.boolean
isSystemClass(java.lang.Class<?> clazz)
Deprecated.Is the class a System Class.boolean
isSystemClass(java.lang.String name)
Deprecated.boolean
isSystemResource(java.lang.String name, java.net.URL webappUrl)
Deprecated.boolean
isThrowUnavailableOnStartupException()
Deprecated.void
postConfigure()
Deprecated.void
preConfigure()
Deprecated.Pre configure the web application.void
prependServerClass(java.lang.String classOrPackage)
Deprecated.void
prependSystemClass(java.lang.String classOrPackage)
Deprecated.void
removeEventListener(java.util.EventListener listener)
Deprecated.Remove a context event listeners.java.lang.String
removeResourceAlias(java.lang.String alias)
Deprecated.void
setAllowDuplicateFragmentNames(boolean allowDuplicateFragmentNames)
Deprecated.void
setClassLoader(java.lang.ClassLoader classLoader)
Deprecated.void
setConfigurationClasses(java.lang.String[] configurations)
Deprecated.void
setConfigurationClasses(java.util.List<java.lang.String> configurations)
Deprecated.void
setConfigurationDiscovered(boolean discovered)
Deprecated.Set the configuration discovery mode.void
setConfigurations(Configuration[] configurations)
Deprecated.void
setContextWhiteList(java.lang.String[] contextWhiteList)
Deprecated.Set the context white list In certain circumstances you want may want to deny access of one webapp from another when you may not fully trust the webapp.void
setCopyWebDir(boolean copy)
Deprecated.void
setCopyWebInf(boolean copyWebInf)
Deprecated.void
setDefaultsDescriptor(java.lang.String defaultsDescriptor)
Deprecated.The default descriptor is a web.xml format file that is applied to the context before the standard WEB-INF/web.xmlvoid
setDescriptor(java.lang.String descriptor)
Deprecated.void
setDisplayName(java.lang.String servletContextName)
Deprecated.void
setDistributable(boolean distributable)
Deprecated.void
setEventListeners(java.util.EventListener[] eventListeners)
Deprecated.Set the context event listeners.void
setExtraClasspath(java.lang.String extraClasspath)
Deprecated.void
setExtractWAR(boolean extractWAR)
Deprecated.void
setLogUrlOnStart(boolean logOnStart)
Deprecated.Sets whether or not the web app name and URL is logged on startupvoid
setOverrideDescriptor(java.lang.String overrideDescriptor)
Deprecated.The override descriptor is a web.xml format file that is applied to the context after the standard WEB-INF/web.xmlvoid
setOverrideDescriptors(java.util.List<java.lang.String> overrideDescriptors)
Deprecated.The override descriptor is a web.xml format file that is applied to the context after the standard WEB-INF/web.xmlvoid
setParentLoaderPriority(boolean java2compliant)
Deprecated.void
setPermissions(java.security.PermissionCollection permissions)
Deprecated.void
setPersistTempDirectory(boolean persist)
Deprecated.If true the temp directory for this webapp will be kept when the webapp stops.void
setResourceAlias(java.lang.String alias, java.lang.String uri)
Deprecated.Set Resource Alias.void
setResourceAliases(java.util.Map<java.lang.String,java.lang.String> map)
Deprecated.void
setServer(Server server)
Deprecated.void
setServerClasses(java.lang.String[] serverClasses)
Deprecated.Set the server classes patterns.java.util.Set<java.lang.String>
setServletSecurity(ServletRegistration.Dynamic registration, ServletSecurityElement servletSecurityElement)
Deprecated.Delegate for ServletRegistration.Dynamic.setServletSecurity methodvoid
setSystemClasses(java.lang.String[] systemClasses)
Deprecated.Set the system classes patterns.void
setTempDirectory(java.io.File dir)
Deprecated.Set temporary directory for context.void
setThrowUnavailableOnStartupException(boolean throwIfStartupException)
Deprecated.void
setWar(java.lang.String war)
Deprecated.Set the war of the webapp.void
setWarResource(Resource war)
Deprecated.Set the war of the webapp as aResource
.java.lang.String
toString()
Deprecated.-
Methods inherited from class org.eclipse.jetty.servlet.ServletContextHandler
addDecorator, addEventListener, addFilter, addFilter, addFilter, addServlet, addServlet, addServlet, callContextDestroyed, callContextInitialized, getDecorators, getDefaultSecurityHandlerClass, getGzipHandler, getObjectFactory, getSecurityHandler, getServletContextHandler, getServletHandler, getSessionHandler, insertHandler, setDecorators, setDefaultSecurityHandlerClass, setGzipHandler, setHandler, setSecurityHandler, setServletHandler, setSessionHandler
-
Methods inherited from class org.eclipse.jetty.server.handler.ContextHandler
addAliasCheck, addLocaleEncoding, addVirtualHosts, checkAlias, checkContext, checkContextPath, checkVirtualHost, clearAliasChecks, clearAttributes, contextDestroyed, contextInitialized, doHandle, doScope, getAliasChecks, getAllowNullPathInfo, getAttribute, getAttributeNames, getAttributeNameSet, getAttributes, getBaseResource, getClassLoader, getClassPath, getContextHandler, getContextPath, getContextPathEncoded, getCurrentContext, getDisplayName, getErrorHandler, getEventListeners, getInitParameter, getInitParameterNames, getInitParams, getLocaleEncoding, getLocaleEncoding, getLocaleEncodings, getLogger, getMaxFormContentSize, getMaxFormKeys, getMimeTypes, getProtectedTargets, getRequestContextPath, getResourceBase, getResourcePaths, getServerInfo, getServletContext, getVirtualHosts, getWelcomeFiles, handle, handle, isAvailable, isCompactPath, isDurableListener, isProgrammaticListener, isProtectedTarget, isShutdown, isUsingSecurityManager, loadClass, newResource, newResource, newResource, removeAttribute, removeVirtualHosts, setAliasChecks, setAllowNullPathInfo, setAttribute, setAttributes, setAvailable, setBaseResource, setCompactPath, setContextPath, setErrorHandler, setInitParameter, setLogger, setManagedAttribute, setMaxFormContentSize, setMaxFormKeys, setMimeTypes, setProtectedTargets, setResourceBase, setServerInfo, setUsingSecurityManager, setVirtualHosts, setWelcomeFiles, shutdown
-
Methods inherited from class org.eclipse.jetty.server.handler.ScopedHandler
handle, nextHandle, nextScope
-
Methods inherited from class org.eclipse.jetty.server.handler.HandlerWrapper
getHandler, getHandlers
-
Methods inherited from class org.eclipse.jetty.server.handler.AbstractHandlerContainer
findContainerOf, getChildHandlerByClass, getChildHandlers, getChildHandlersByClass
-
Methods inherited from class org.eclipse.jetty.server.handler.AbstractHandler
getServer
-
Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, dump, dump, dump, dump, dumpObject, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, unmanage, updateBean, updateBean, updateBeans
-
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer
isDumpable
-
Methods inherited from interface org.eclipse.jetty.util.component.LifeCycle
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
-
Methods inherited from interface org.eclipse.jetty.webapp.WebAppClassLoader.Context
newResource
-
-
-
-
Field Detail
-
TEMPDIR
public static final java.lang.String TEMPDIR
Deprecated.- See Also:
- Constant Field Values
-
BASETEMPDIR
public static final java.lang.String BASETEMPDIR
Deprecated.- See Also:
- Constant Field Values
-
WEB_DEFAULTS_XML
public static final java.lang.String WEB_DEFAULTS_XML
Deprecated.- See Also:
- Constant Field Values
-
ERROR_PAGE
public static final java.lang.String ERROR_PAGE
Deprecated.- See Also:
- Constant Field Values
-
SERVER_SYS_CLASSES
public static final java.lang.String SERVER_SYS_CLASSES
Deprecated.- See Also:
- Constant Field Values
-
SERVER_SRV_CLASSES
public static final java.lang.String SERVER_SRV_CLASSES
Deprecated.- See Also:
- Constant Field Values
-
DEFAULT_CONFIGURATION_CLASSES
public static final java.lang.String[] DEFAULT_CONFIGURATION_CLASSES
Deprecated.
-
__dftSystemClasses
public static final java.lang.String[] __dftSystemClasses
Deprecated.
-
__dftServerClasses
public static final java.lang.String[] __dftServerClasses
Deprecated.
-
-
Constructor Detail
-
WebAppContext
public WebAppContext()
Deprecated.
-
WebAppContext
public WebAppContext(java.lang.String webApp, java.lang.String contextPath)
Deprecated.- Parameters:
contextPath
- The context pathwebApp
- The URL or filename of the webapp directory or war file.
-
WebAppContext
public WebAppContext(Resource webApp, java.lang.String contextPath)
Deprecated.- Parameters:
contextPath
- The context pathwebApp
- The URL or filename of the webapp directory or war file.
-
WebAppContext
public WebAppContext(HandlerContainer parent, java.lang.String webApp, java.lang.String contextPath)
Deprecated.- Parameters:
parent
- The parent HandlerContainer.contextPath
- The context pathwebApp
- The URL or filename of the webapp directory or war file.
-
WebAppContext
public WebAppContext(HandlerContainer parent, Resource webApp, java.lang.String contextPath)
Deprecated.- Parameters:
parent
- The parent HandlerContainer.contextPath
- The context pathwebApp
- The webapp directory or war file.
-
WebAppContext
public WebAppContext(SessionHandler sessionHandler, SecurityHandler securityHandler, ServletHandler servletHandler, ErrorHandler errorHandler)
Deprecated.This constructor is used in the geronimo integration.- Parameters:
sessionHandler
- SessionHandler for this web appsecurityHandler
- SecurityHandler for this web appservletHandler
- ServletHandler for this web apperrorHandler
- ErrorHandler for this web app
-
WebAppContext
public WebAppContext(HandlerContainer parent, java.lang.String contextPath, SessionHandler sessionHandler, SecurityHandler securityHandler, ServletHandler servletHandler, ErrorHandler errorHandler, int options)
Deprecated.This constructor is used in the geronimo integration.- Parameters:
parent
- the parent handlercontextPath
- the context pathsessionHandler
- SessionHandler for this web appsecurityHandler
- SecurityHandler for this web appservletHandler
- ServletHandler for this web apperrorHandler
- ErrorHandler for this web appoptions
- the options (ServletContextHandler.SESSIONS
and/orServletContextHandler.SECURITY
)
-
-
Method Detail
-
getCurrentWebAppContext
public static WebAppContext getCurrentWebAppContext()
Deprecated.
-
setDisplayName
public void setDisplayName(java.lang.String servletContextName)
Deprecated.- Overrides:
setDisplayName
in classContextHandler
- Parameters:
servletContextName
- The servletContextName to set.
-
getUnavailableException
public java.lang.Throwable getUnavailableException()
Deprecated.Get an exception that caused the webapp to be unavailable- Returns:
- A throwable if the webapp is unavailable or null
-
setResourceAlias
public void setResourceAlias(java.lang.String alias, java.lang.String uri)
Deprecated.Set Resource Alias. Resource aliases map resource uri's within a context. They may optionally be used by a handler when looking for a resource.- Parameters:
alias
- the alias for a resourceuri
- the uri for the resource
-
getResourceAliases
public java.util.Map<java.lang.String,java.lang.String> getResourceAliases()
Deprecated.
-
setResourceAliases
public void setResourceAliases(java.util.Map<java.lang.String,java.lang.String> map)
Deprecated.
-
getResourceAlias
public java.lang.String getResourceAlias(java.lang.String path)
Deprecated.
-
removeResourceAlias
public java.lang.String removeResourceAlias(java.lang.String alias)
Deprecated.
-
setClassLoader
public void setClassLoader(java.lang.ClassLoader classLoader)
Deprecated.- Overrides:
setClassLoader
in classContextHandler
- Parameters:
classLoader
- The classLoader to set.
-
getResource
public Resource getResource(java.lang.String uriInContext) throws java.net.MalformedURLException
Deprecated.- Overrides:
getResource
in classContextHandler
- Throws:
java.net.MalformedURLException
-
isConfigurationDiscovered
public boolean isConfigurationDiscovered()
Deprecated.Is the context Automatically configured.- Returns:
- true if configuration discovery.
-
setConfigurationDiscovered
public void setConfigurationDiscovered(boolean discovered)
Deprecated.Set the configuration discovery mode. If configuration discovery is set to true, then the JSR315 servlet 3.0 discovered configuration features are enabled. These are:- Web Fragments
- META-INF/resource directories
- Parameters:
discovered
- true if configuration discovery is enabled for automatic configuration from the context
-
preConfigure
public void preConfigure() throws java.lang.Exception
Deprecated.Pre configure the web application.The method is normally called from
AbstractLifeCycle.start()
. It performs the discovery of the configurations to be applied to this context, specifically:- Instantiate the
Configuration
instances with a call toloadConfigurations()
. - Setup the default System classes by calling
loadSystemClasses()
- Setup the default Server classes by calling
loadServerClasses()
- Instantiates a classload (if one is not already set)
- Calls the
Configuration.preConfigure(WebAppContext)
method of all Configuration instances.
- Throws:
java.lang.Exception
- if unable to pre configure
- Instantiate the
-
configure
public void configure() throws java.lang.Exception
Deprecated.- Throws:
java.lang.Exception
-
postConfigure
public void postConfigure() throws java.lang.Exception
Deprecated.- Throws:
java.lang.Exception
-
destroy
public void destroy()
Deprecated.Description copied from class:ContainerLifeCycle
Destroys the managed Destroyable beans in the reverse order they were added.- Specified by:
destroy
in interfaceDestroyable
- Specified by:
destroy
in interfaceHandler
- Overrides:
destroy
in classHandlerWrapper
-
getConfigurationClasses
@ManagedAttribute(value="configuration classes used to configure webapp", readonly=true) public java.lang.String[] getConfigurationClasses()
Deprecated.- Returns:
- Returns the configurations.
-
getConfigurations
public Configuration[] getConfigurations()
Deprecated.- Returns:
- Returns the configurations.
-
getDefaultsDescriptor
@ManagedAttribute(value="default web.xml deascriptor applied before standard web.xml", readonly=true) public java.lang.String getDefaultsDescriptor()
Deprecated.The default descriptor is a web.xml format file that is applied to the context before the standard WEB-INF/web.xml- Returns:
- Returns the defaultsDescriptor.
-
getOverrideDescriptor
public java.lang.String getOverrideDescriptor()
Deprecated.The override descriptor is a web.xml format file that is applied to the context after the standard WEB-INF/web.xml- Returns:
- Returns the Override Descriptor.
-
getOverrideDescriptors
@ManagedAttribute(value="web.xml deascriptors applied after standard web.xml", readonly=true) public java.util.List<java.lang.String> getOverrideDescriptors()
Deprecated.An override descriptor is a web.xml format file that is applied to the context after the standard WEB-INF/web.xml- Returns:
- Returns the Override Descriptor list
-
getPermissions
public java.security.PermissionCollection getPermissions()
Deprecated.- Specified by:
getPermissions
in interfaceWebAppClassLoader.Context
- Returns:
- Returns the permissions.
-
getServerClasses
@ManagedAttribute(value="classes and packages hidden by the context classloader", readonly=true) public java.lang.String[] getServerClasses()
Deprecated.- Returns:
- Returns the serverClasses.
- See Also:
setServerClasses(String[])
-
getServerClasspathPattern
public ClasspathPattern getServerClasspathPattern()
Deprecated.- Returns:
- The ClasspathPattern used to match Server (hidden) classes
-
addServerClass
@Deprecated public void addServerClass(java.lang.String classOrPackageOrLocation)
Deprecated.- Parameters:
classOrPackageOrLocation
- pattern (seeClasspathPattern
-
prependServerClass
@Deprecated public void prependServerClass(java.lang.String classOrPackage)
Deprecated.Prepend to the list of Server classes.- Parameters:
classOrPackage
- A pattern.- See Also:
setServerClasses(String[])
, Jetty Documentation: Classloading
-
getSystemClasses
@ManagedAttribute(value="classes and packages given priority by context classloader", readonly=true) public java.lang.String[] getSystemClasses()
Deprecated.- Returns:
- Returns the systemClasses.
- See Also:
setSystemClasses(String[])
-
getSystemClasspathPattern
public ClasspathPattern getSystemClasspathPattern()
Deprecated.- Returns:
- The ClasspathPattern used to match System (protected) classes
-
addSystemClass
@Deprecated public void addSystemClass(java.lang.String classOrPackage)
Deprecated.- Parameters:
classOrPackage
- pattern
-
prependSystemClass
@Deprecated public void prependSystemClass(java.lang.String classOrPackage)
Deprecated.Prepend to the list of System classes.- Parameters:
classOrPackage
- A pattern.- See Also:
setSystemClasses(String[])
, Jetty Documentation: Classloading
-
isServerClass
@Deprecated public boolean isServerClass(java.lang.String name)
Deprecated.- Parameters:
name
- class name- Returns:
- true if matched by
getServerClasspathPattern()
-
isSystemClass
@Deprecated public boolean isSystemClass(java.lang.String name)
Deprecated.- Parameters:
name
- class name- Returns:
- true if matched by
getServerClasspathPattern()
-
isServerClass
public boolean isServerClass(java.lang.Class<?> clazz)
Deprecated.Description copied from interface:ClassVisibilityChecker
Is the class a Server Class. A Server class is a class that is part of the implementation of the server and is NIT visible to a webapplication. The web application may provide it's own implementation of the class, to be loaded from WEB-INF/lib or WEB-INF/classes- Specified by:
isServerClass
in interfaceClassVisibilityChecker
- Parameters:
clazz
- The fully qualified name of the class.- Returns:
- True if the class is a server class.
-
isSystemClass
public boolean isSystemClass(java.lang.Class<?> clazz)
Deprecated.Description copied from interface:ClassVisibilityChecker
Is the class a System Class. A System class is a class that is visible to a webapplication, but that cannot be overridden by the contents of WEB-INF/lib or WEB-INF/classes- Specified by:
isSystemClass
in interfaceClassVisibilityChecker
- Parameters:
clazz
- The fully qualified name of the class.- Returns:
- True if the class is a system class.
-
isServerResource
public boolean isServerResource(java.lang.String name, java.net.URL parentUrl)
Deprecated.- Specified by:
isServerResource
in interfaceWebAppClassLoader.Context
-
isSystemResource
public boolean isSystemResource(java.lang.String name, java.net.URL webappUrl)
Deprecated.- Specified by:
isSystemResource
in interfaceWebAppClassLoader.Context
-
getWar
@ManagedAttribute(value="war file location", readonly=true) public java.lang.String getWar()
Deprecated.- Returns:
- Returns the war as a file or URL string (Resource).
The war may be different to the @link
ContextHandler.getResourceBase()
if the war has been expanded and/or copied.
-
getWebInf
public Resource getWebInf() throws java.io.IOException
Deprecated.- Throws:
java.io.IOException
-
isDistributable
@ManagedAttribute("web application distributable") public boolean isDistributable()
Deprecated.- Returns:
- Returns the distributable.
-
isExtractWAR
@ManagedAttribute(value="extract war", readonly=true) public boolean isExtractWAR()
Deprecated.- Returns:
- Returns the extractWAR.
-
isCopyWebDir
@ManagedAttribute(value="webdir copied on deploy (allows hot replacement on windows)", readonly=true) public boolean isCopyWebDir()
Deprecated.- Returns:
- True if the webdir is copied (to allow hot replacement of jars on windows)
-
isCopyWebInf
public boolean isCopyWebInf()
Deprecated.- Returns:
- True if the web-inf lib and classes directories are copied (to allow hot replacement of jars on windows)
-
isParentLoaderPriority
@ManagedAttribute(value="parent classloader given priority", readonly=true) public boolean isParentLoaderPriority()
Deprecated.- Specified by:
isParentLoaderPriority
in interfaceWebAppClassLoader.Context
- Returns:
- True if the classloader should delegate first to the parent classloader (standard java behaviour) or false if the classloader should first try to load from WEB-INF/lib or WEB-INF/classes (servlet spec recommendation). Default is false or can be set by the system property org.eclipse.jetty.server.webapp.parentLoaderPriority
-
getDefaultConfigurationClasses
public static java.lang.String[] getDefaultConfigurationClasses()
Deprecated.
-
getDefaultServerClasses
public java.lang.String[] getDefaultServerClasses()
Deprecated.
-
getDefaultSystemClasses
public java.lang.String[] getDefaultSystemClasses()
Deprecated.
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toString
in classContextHandler
-
dump
public void dump(java.lang.Appendable out, java.lang.String indent) throws java.io.IOException
Deprecated.Description copied from interface:Dumpable
Dump this object (and children) into an Appendable using the provided indent after any new lines. The indent should not be applied to the first object dumped.- Specified by:
dump
in interfaceDumpable
- Overrides:
dump
in classContextHandler
- Parameters:
out
- The appendable to dump toindent
- The indent to apply after any new lines.- Throws:
java.io.IOException
- if unable to write to Appendable
-
setConfigurationClasses
public void setConfigurationClasses(java.lang.String[] configurations)
Deprecated.- Parameters:
configurations
- The configuration class names. If setConfigurations is not called these classes are used to create a configurations array.
-
setConfigurationClasses
public void setConfigurationClasses(java.util.List<java.lang.String> configurations)
Deprecated.
-
setConfigurations
public void setConfigurations(Configuration[] configurations)
Deprecated.- Parameters:
configurations
- The configurations to set.
-
setDefaultsDescriptor
public void setDefaultsDescriptor(java.lang.String defaultsDescriptor)
Deprecated.The default descriptor is a web.xml format file that is applied to the context before the standard WEB-INF/web.xml- Parameters:
defaultsDescriptor
- The defaultsDescriptor to set.
-
setOverrideDescriptor
public void setOverrideDescriptor(java.lang.String overrideDescriptor)
Deprecated.The override descriptor is a web.xml format file that is applied to the context after the standard WEB-INF/web.xml- Parameters:
overrideDescriptor
- The overrideDescritpor to set.
-
setOverrideDescriptors
public void setOverrideDescriptors(java.util.List<java.lang.String> overrideDescriptors)
Deprecated.The override descriptor is a web.xml format file that is applied to the context after the standard WEB-INF/web.xml- Parameters:
overrideDescriptors
- The overrideDescriptors (file or URL) to set.
-
addOverrideDescriptor
public void addOverrideDescriptor(java.lang.String overrideDescriptor)
Deprecated.The override descriptor is a web.xml format file that is applied to the context after the standard WEB-INF/web.xml- Parameters:
overrideDescriptor
- The overrideDescriptor (file or URL) to add.
-
getDescriptor
@ManagedAttribute(value="standard web.xml descriptor", readonly=true) public java.lang.String getDescriptor()
Deprecated.- Returns:
- the web.xml descriptor to use. If set to null, WEB-INF/web.xml is used if it exists.
-
setDescriptor
public void setDescriptor(java.lang.String descriptor)
Deprecated.- Parameters:
descriptor
- the web.xml descriptor to use. If set to null, WEB-INF/web.xml is used if it exists.
-
setDistributable
public void setDistributable(boolean distributable)
Deprecated.- Parameters:
distributable
- The distributable to set.
-
setEventListeners
public void setEventListeners(java.util.EventListener[] eventListeners)
Deprecated.Description copied from class:ContextHandler
Set the context event listeners.- Overrides:
setEventListeners
in classContextHandler
- Parameters:
eventListeners
- the event listeners- See Also:
ServletContextListener
,ServletContextAttributeListener
,ServletRequestListener
,ServletRequestAttributeListener
-
removeEventListener
public void removeEventListener(java.util.EventListener listener)
Deprecated.Description copied from class:ContextHandler
Remove a context event listeners.- Overrides:
removeEventListener
in classContextHandler
- Parameters:
listener
- the event listener to remove- See Also:
ServletContextListener
,ServletContextAttributeListener
,ServletRequestListener
,ServletRequestAttributeListener
-
setExtractWAR
public void setExtractWAR(boolean extractWAR)
Deprecated.- Parameters:
extractWAR
- True if war files are extracted
-
setCopyWebDir
public void setCopyWebDir(boolean copy)
Deprecated.- Parameters:
copy
- True if the webdir is copied (to allow hot replacement of jars)
-
setCopyWebInf
public void setCopyWebInf(boolean copyWebInf)
Deprecated.- Parameters:
copyWebInf
- True if the web-inf lib and classes directories are copied (to allow hot replacement of jars on windows)
-
setParentLoaderPriority
public void setParentLoaderPriority(boolean java2compliant)
Deprecated.- Parameters:
java2compliant
- True if the classloader should delegate first to the parent classloader (standard java behaviour) or false if the classloader should first try to load from WEB-INF/lib or WEB-INF/classes (servlet spec recommendation). Default is false or can be set by the system property org.eclipse.jetty.server.webapp.parentLoaderPriority
-
setPermissions
public void setPermissions(java.security.PermissionCollection permissions)
Deprecated.- Parameters:
permissions
- The permissions to set.
-
setContextWhiteList
public void setContextWhiteList(java.lang.String[] contextWhiteList)
Deprecated.Set the context white list In certain circumstances you want may want to deny access of one webapp from another when you may not fully trust the webapp. Setting this white list will enable a check when a servlet calledContextHandler.Context.getContext(String)
, validating that the uriInPath for the given webapp has been declaratively allows access to the context.- Parameters:
contextWhiteList
- the whitelist of contexts forContextHandler.Context.getContext(String)
-
setServerClasses
public void setServerClasses(java.lang.String[] serverClasses)
Deprecated.Set the server classes patterns.Server classes/packages are classes used to implement the server and are hidden from the context. If the context needs to load these classes, it must have its own copy of them in WEB-INF/lib or WEB-INF/classes. A
ClasspathPattern
is used to match the server classes.- Parameters:
serverClasses
- The serverClasses to set.
-
setSystemClasses
public void setSystemClasses(java.lang.String[] systemClasses)
Deprecated.Set the system classes patterns.System classes/packages are classes provided by the JVM and that cannot be replaced by classes of the same name from WEB-INF, regardless of the value of
setParentLoaderPriority(boolean)
. AClasspathPattern
is used to match the system classes.- Parameters:
systemClasses
- The systemClasses to set.
-
setTempDirectory
public void setTempDirectory(java.io.File dir)
Deprecated.Set temporary directory for context. The javax.servlet.context.tempdir attribute is also set.- Parameters:
dir
- Writable temporary directory.
-
getTempDirectory
@ManagedAttribute(value="temporary directory location", readonly=true) public java.io.File getTempDirectory()
Deprecated.
-
setPersistTempDirectory
public void setPersistTempDirectory(boolean persist)
Deprecated.If true the temp directory for this webapp will be kept when the webapp stops. Otherwise, it will be deleted.- Parameters:
persist
- true to persist the temp directory on shutdown / exit of the webapp
-
isPersistTempDirectory
public boolean isPersistTempDirectory()
Deprecated.- Returns:
- true if tmp directory will persist between startups of the webapp
-
setWar
public void setWar(java.lang.String war)
Deprecated.Set the war of the webapp. From this value aContextHandler.setResourceBase(String)
value is computed byWebInfConfiguration
, which may be changed from the war URI by unpacking and/or copying.- Parameters:
war
- The war to set as a file name or URL.
-
setWarResource
public void setWarResource(Resource war)
Deprecated.Set the war of the webapp as aResource
.- Parameters:
war
- The war to set as a Resource.- See Also:
setWar(String)
-
getExtraClasspath
@ManagedAttribute(value="extra classpath for context classloader", readonly=true) public java.lang.String getExtraClasspath()
Deprecated.- Specified by:
getExtraClasspath
in interfaceWebAppClassLoader.Context
- Returns:
- Comma or semicolon separated path of filenames or URLs pointing to directories or jar files. Directories should end with '/'.
-
setExtraClasspath
public void setExtraClasspath(java.lang.String extraClasspath)
Deprecated.- Parameters:
extraClasspath
- Comma or semicolon separated path of filenames or URLs pointing to directories or jar files. Directories should end with '/'.
-
isLogUrlOnStart
public boolean isLogUrlOnStart()
Deprecated.
-
setLogUrlOnStart
public void setLogUrlOnStart(boolean logOnStart)
Deprecated.Sets whether or not the web app name and URL is logged on startup- Parameters:
logOnStart
- whether or not the log message is created
-
setServer
public void setServer(Server server)
Deprecated.- Specified by:
setServer
in interfaceHandler
- Overrides:
setServer
in classContextHandler
-
isAllowDuplicateFragmentNames
public boolean isAllowDuplicateFragmentNames()
Deprecated.
-
setAllowDuplicateFragmentNames
public void setAllowDuplicateFragmentNames(boolean allowDuplicateFragmentNames)
Deprecated.
-
setThrowUnavailableOnStartupException
public void setThrowUnavailableOnStartupException(boolean throwIfStartupException)
Deprecated.
-
isThrowUnavailableOnStartupException
public boolean isThrowUnavailableOnStartupException()
Deprecated.
-
setServletSecurity
public java.util.Set<java.lang.String> setServletSecurity(ServletRegistration.Dynamic registration, ServletSecurityElement servletSecurityElement)
Deprecated.Description copied from class:ServletContextHandler
Delegate for ServletRegistration.Dynamic.setServletSecurity method- Overrides:
setServletSecurity
in classServletContextHandler
- Parameters:
registration
- ServletRegistration.Dynamic instance that setServletSecurity was called onservletSecurityElement
- new security info- Returns:
- the set of exact URL mappings currently associated with the registration that are also present in the web.xml security constraints and thus will be unaffected by this call.
-
getMetaData
public MetaData getMetaData()
Deprecated.
-
addServerClasses
public static void addServerClasses(Server server, java.lang.String... pattern)
Deprecated.
-
addSystemClasses
public static void addSystemClasses(Server server, java.lang.String... pattern)
Deprecated.
-
-