The WebAppContext handler is an extension of ContextHandler that
coordinates the construction and configuration of nested handlers:
ConstraintSecurityHandler, org.
and ServletHandler.
The handlers are configured by pluggable configuration classes, with
the default being WebXmlConfiguration and
JettyWebXmlConfiguration.
| Modifier and Type | Class and Description |
|---|---|
| public class |
| Modifier and Type | Field and Description |
|---|---|
| private static String[] | |
| public static final ClassMatcher | |
| public static final ClassMatcher | |
| private boolean | |
| private boolean | |
| private Configurations | |
| private String[] | |
| private boolean | |
| private boolean | |
| private boolean | |
| private String | |
| private String | |
| private boolean | |
| private List | |
| private boolean | |
| private ClassLoader | |
| private boolean | |
| private MetaData | |
| private final List | |
| private boolean | |
| private PermissionCollection | |
| private Map | |
| private final ClassMatcher | |
| private final ClassMatcher | |
| private boolean | |
| private Throwable | |
| private String | |
| pack-priv static final Logger | |
| public static final String | |
| public static final String | |
| public static final String |
| Access | Constructor and Description |
|---|---|
| public | |
| public | WebAppContext(String
The URL or filename of the webapp directory or war file. webApp, String The context path contextPath)
|
| public | WebAppContext(Resource
The URL or filename of the webapp directory or war file. webApp, String The context path contextPath)
|
| public | WebAppContext(SessionHandler
SessionHandler for this web app sessionHandler, SecurityHandler SecurityHandler for this web app securityHandler, ServletHandler ServletHandler for this web app servletHandler, ErrorHandler ErrorHandler for this web app errorHandler)
|
| public | WebAppContext(String
the context path contextPath, SessionHandler SessionHandler for this web app sessionHandler, SecurityHandler SecurityHandler for this web app securityHandler, ServletHandler ServletHandler for this web app servletHandler, ErrorHandler ErrorHandler for this web app errorHandler, int the options ( options)ServletContextHandler#SESSIONS and/or ServletContextHandler#SECURITY)
|
| Modifier and Type | Method and Description |
|---|---|
| private static void | |
| public void | |
| public void | addOverrideDescriptor(String
The overrideDescriptor (file or URL) to add. overrideDescriptor)The override descriptor is a web.xml format file that is applied to the context after the standard WEB-INF/web.xml |
| public static void | |
| public void | addServerClassMatcher(ClassMatcher
The class matcher of patterns to add to the server ClassMatcher serverClasses)Add a ClassMatcher for server classes by combining with any existing matcher. |
| public static void | |
| public void | addSystemClassMatcher(ClassMatcher
The class matcher of patterns to add to the system ClassMatcher systemClasses)Add a ClassMatcher for system classes by combining with any existing matcher. |
| public boolean | |
| protected ClassLoader | Returns: Either the configured loader, or a newClassLoader that uses the loader.The loader initially set on this context by loader)setClassLoader(ClassLoader)Configure the context |
| protected void | createTempDirectory()
Overrides org. Create the temporary directory. |
| public void | destroy()
Overrides org. Implements org. |
| protected void | doStart()
Overrides org. |
| public void | dump(Appendable
The appendable to dump to out, String The indent to apply after any new lines. indent)Overrides org. Implements org. |
| private void | |
| public <T> T | |
| public String[] | |
| public Configurations | |
| public static WebAppContext | |
| public String | Returns: Returns the defaultsDescriptor.The default descriptor is a web.xml format file that is applied to the context before the standard WEB-INF/web.xml |
| public String | Returns: the web.xml descriptor to use. If set to null, WEB-INF/web.xml is used if it exists.
|
| public List | Returns: Comma or semicolon separated path of filenames or URLs pointing to directories or jar files. Directories should end with '/'.Implements org. |
| public MetaData | |
| public String | Returns: Returns the Override Descriptor.The override descriptor is a web.xml format file that is applied to the context after the standard WEB-INF/web.xml |
| public List | Returns: Returns the Override Descriptor listAn override descriptor is a web.xml format file that is applied to the context after the standard WEB-INF/web.xml |
| public PermissionCollection | Returns: Returns the permissions.Implements org. |
| public Resource | getResource(String
the path within the base resource to attempt to get pathInContext)Overrides org. |
| public String | |
| public Map | |
| public ResourceFactory | |
| public String[] | |
| public ClassMatcher | |
| public String[] | |
| public ClassMatcher | |
| public Throwable | Returns: A throwable if the webapp is unavailable or nullGet an exception that caused the webapp to be unavailable |
| public String | Returns: Returns the war as a file or URL string (Resource). The war may be different to the @linkgetBaseResource()
if the war has been expanded and/or copied.
|
| public Resource | |
| public void | initializeDefaults(Map<String, String> properties)
Implements org. |
| public boolean | |
| public boolean | Returns: true if configuration discovery.Is the context Automatically configured. |
| public boolean | |
| public boolean | |
| public boolean | Returns: True if the web-inf lib and classes directories are copied (to allow hot replacement of jars on windows)
|
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | 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.parentLoaderPriorityImplements org. |
| public boolean | isServerClass(Class<?>
The fully qualified name of the class. clazz)Implements org. |
| public boolean | isServerResource(String name, URL url)
Implements org. |
| public boolean | isSystemClass(Class<?>
The fully qualified name of the class. clazz)Implements org. |
| public boolean | isSystemResource(String name, URL url)
Implements org. |
| public boolean | |
| protected void | |
| protected Configurations | |
| public ServletContextHandler. | |
| public void | |
| public void | |
| public void | |
| public void | |
| public boolean | removeEventListener(EventListener
the listener to remove listener)Overrides org. Implements org. |
| public String | |
| public void | |
| public void | setClassLoader(ClassLoader classLoader)
Overrides org. |
| public void | setConfigurationClasses(String[]
The configuration class names. If setConfigurations is not called
these classes are used to create a configurations array. configurations)
|
| public void | |
| public void | setConfigurationDiscovered(boolean
true if configuration discovery is enabled for automatic configuration from the context discovered)Set the configuration discovery mode. |
| public void | |
| public void | |
| public void | setContextPath(String
The _contextPath to set. contextPath)Overrides org. |
| public void | setContextWhiteList(String...
the whitelist of contexts contextWhiteList)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. |
| public void | |
| public void | setCopyWebInf(boolean
True if the web-inf lib and classes directories are copied (to allow hot replacement of jars on windows) copyWebInf)
|
| public void | |
| public void | setDefaultsDescriptor(String
The defaultsDescriptor to set. defaultsDescriptor)The default descriptor is a web.xml format file that is applied to the context before the standard WEB-INF/web.xml |
| public void | setDescriptor(String
the web.xml descriptor to use. If set to null, WEB-INF/web.xml is used if it exists. descriptor)Set the web.xml descriptor to use. |
| public void | setDisplayName(String
The servletContextName to set. servletContextName)Overrides org. |
| public void | |
| public void | setExtraClasspath(String
Comma or semicolon separated path of filenames or URLs
pointing to directories or jar files. Directories should end
with '/'. extraClasspath)Set the Extra ClassPath via delimited String. |
| public void | |
| public void | |
| public void | setLogUrlOnStart(boolean
whether or not the log message is created logOnStart)Sets whether or not the web app name and URL is logged on startup |
| public void | setOverrideDescriptor(String
The overrideDescritpor to set. overrideDescriptor)The override descriptor is a web.xml format file that is applied to the context after the standard WEB-INF/web.xml |
| public void | setOverrideDescriptors(List<String>
The overrideDescriptors (file or URL) to set. overrideDescriptors)The override descriptor is a web.xml format file that is applied to the context after the standard WEB-INF/web.xml |
| public void | setParentLoaderPriority(boolean
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 java2compliant)
|
| public void | |
| public void | setResourceAlias(String
the alias for a resource alias, String the uri for the resource uri)Set Resource Alias. |
| public void | |
| public void | setServer(Server
the server)Server to associate to this HandlerOverrides org. Implements org. Server to associate to this Handler.
|
| public void | setServerClassMatcher(ClassMatcher
the server classes pattern serverClasses)Set the server classes patterns. |
| public Set | setServletSecurity(ServletRegistration.
ServletRegistration.Dynamic instance that setServletSecurity was called on registration,new security info servletSecurityElement)Overrides org. |
| public void | setSystemClassMatcher(ClassMatcher
the system classes pattern systemClasses)Set the system classes patterns. |
| public void | |
| public void | |
| public void | |
| protected void | startContext()
Overrides org. |
| protected void | |
| public String | toString()
Overrides org. |