public class JettyWebAppContext extends WebAppContext
WebAppContext.Context
ServletContextHandler.Decorator, ServletContextHandler.JspConfig, ServletContextHandler.JspPropertyGroup, ServletContextHandler.ServletContainerInitializerCaller, ServletContextHandler.TagLib
ContextHandler.AliasCheck, ContextHandler.ApproveAliases, ContextHandler.ApproveNonExistentDirectoryAliases, ContextHandler.Availability, ContextHandler.ContextScopeListener, ContextHandler.StaticContext
AbstractHandler.ErrorDispatchHandler
AbstractLifeCycle.AbstractLifeCycleListener
Graceful.Shutdown
LifeCycle.Listener
Container.InheritedListener, Container.Listener
Modifier and Type | Field and Description |
---|---|
private boolean |
_baseAppFirst
If there is no maven-war-plugin config for ordering of the current project in the
sequence of overlays, use this to control whether the current project is added
first or last in list of overlaid resources
|
private java.io.File |
_classes |
private java.util.List<java.io.File> |
_classpathFiles |
private java.lang.String |
_containerIncludeJarPattern
Set the "org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern" with a pattern for matching jars on
container classpath to scan.
|
private boolean |
_generateOrigin |
private boolean |
_isGenerateQuickStart |
private java.lang.String |
_jettyEnvXml |
private java.lang.String |
_originAttribute |
private java.util.List<Overlay> |
_overlays |
private PreconfigureDescriptorProcessor |
_preconfigProcessor |
private Resource |
_quickStartWebXml |
private java.io.File |
_testClasses |
private java.util.List<java.io.File> |
_webInfClasses |
private java.lang.String |
_webInfIncludeJarPattern
Set the "org.eclipse.jetty.server.webapp.WebInfIncludeJarPattern" with a pattern for matching jars on
webapp's classpath to scan.
|
private java.util.Map<java.lang.String,java.io.File> |
_webInfJarMap |
private java.util.List<java.io.File> |
_webInfJars |
static java.lang.String[] |
DEFAULT_CONFIGURATION_CLASSES |
private static java.lang.String |
DEFAULT_CONTAINER_INCLUDE_JAR_PATTERN |
private static Logger |
LOG |
static java.lang.String[] |
MINIMUM_CONFIGURATION_CLASSES |
static java.lang.String[] |
QUICKSTART_CONFIGURATION_CLASSES |
private static java.lang.String |
WEB_INF_CLASSES_PREFIX |
private static java.lang.String |
WEB_INF_LIB_PREFIX |
__dftServerClasses, __dftSystemClasses, BASETEMPDIR, ERROR_PAGE, SERVER_SRV_CLASSES, SERVER_SYS_CLASSES, TEMPDIR, WEB_DEFAULTS_XML
_defaultSecurityHandlerClass, _gzipHandler, _jspConfig, _objFactory, _options, _securityHandler, _servletHandler, _sessionHandler, GZIP, NO_SECURITY, NO_SESSIONS, SECURITY, SESSIONS
_scontext, DEFAULT_LISTENER_TYPE_INDEX, EXTENDED_LISTENER_TYPE_INDEX, MANAGED_ATTRIBUTES, SERVLET_LISTENER_TYPES, SERVLET_MAJOR_VERSION, SERVLET_MINOR_VERSION
_nextScope, _outerScope
_handler
Constructor and Description |
---|
JettyWebAppContext() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
addPattern(java.lang.String s,
java.lang.String pattern) |
void |
doStart()
Starts the managed lifecycle beans in the order they were added.
|
void |
doStop()
Stops the managed lifecycle beans in the reverse order they were added.
|
boolean |
getBaseAppFirst() |
java.io.File |
getClasses() |
java.util.List<java.io.File> |
getClassPathFiles() |
java.lang.String |
getContainerIncludeJarPattern() |
java.lang.String |
getJettyEnvXml() |
java.lang.String |
getOriginAttribute() |
java.util.List<Overlay> |
getOverlays() |
Resource |
getQuickStartWebDescriptor() |
Resource |
getResource(java.lang.String uriInContext) |
java.util.Set<java.lang.String> |
getResourcePaths(java.lang.String path) |
java.io.File |
getTestClasses() |
java.util.List<java.io.File> |
getWebInfClasses() |
java.lang.String |
getWebInfIncludeJarPattern() |
java.util.List<java.io.File> |
getWebInfLib() |
void |
initCDI() |
boolean |
isGenerateOrigin() |
boolean |
isGenerateQuickStart() |
protected void |
loadConfigurations() |
void |
setBaseAppFirst(boolean value) |
void |
setClasses(java.io.File dir) |
void |
setContainerIncludeJarPattern(java.lang.String pattern) |
void |
setGenerateOrigin(boolean generateOrigin) |
void |
setGenerateQuickStart(boolean quickStart) |
void |
setJettyEnvXml(java.lang.String jettyEnvXml) |
void |
setOriginAttribute(java.lang.String originAttribute) |
void |
setOverlays(java.util.List<Overlay> overlays)
Ordered list of wars to overlay on top of the current project.
|
protected void |
setQuickStartWebDescriptor(Resource quickStartWebXml) |
void |
setQuickStartWebDescriptor(java.lang.String quickStartWebXml) |
void |
setResourceBases(java.lang.String[] resourceBases)
This method is provided as a convenience for jetty maven plugin configuration
|
void |
setTestClasses(java.io.File dir) |
void |
setWebInfIncludeJarPattern(java.lang.String pattern) |
void |
setWebInfLib(java.util.List<java.io.File> jars) |
protected void |
startWebapp() |
protected void |
stopWebapp() |
addOverrideDescriptor, addServerClass, addServerClasses, addSystemClass, addSystemClasses, configure, destroy, dump, getConfigurationClasses, getConfigurations, getCurrentWebAppContext, getDefaultConfigurationClasses, getDefaultsDescriptor, getDefaultServerClasses, getDefaultSystemClasses, getDescriptor, getExtraClasspath, getMetaData, getOverrideDescriptor, getOverrideDescriptors, getPermissions, getResourceAlias, getResourceAliases, getServerClasses, getServerClasspathPattern, getSystemClasses, getSystemClasspathPattern, getTempDirectory, getUnavailableException, getWar, getWebInf, isAllowDuplicateFragmentNames, isConfigurationDiscovered, isCopyWebDir, isCopyWebInf, isDistributable, isExtractWAR, isLogUrlOnStart, isParentLoaderPriority, isPersistTempDirectory, isServerClass, isServerClass, isServerResource, isSystemClass, isSystemClass, isSystemResource, isThrowUnavailableOnStartupException, loadServerClasses, loadSystemClasses, postConfigure, preConfigure, prependServerClass, prependSystemClass, removeEventListener, removeResourceAlias, setAllowDuplicateFragmentNames, setClassLoader, setConfigurationClasses, setConfigurationClasses, setConfigurationDiscovered, setConfigurations, setContextWhiteList, setCopyWebDir, setCopyWebInf, setDefaultsDescriptor, setDescriptor, setDisplayName, setDistributable, setEventListeners, setExtraClasspath, setExtractWAR, setLogUrlOnStart, setOverrideDescriptor, setOverrideDescriptors, setParentLoaderPriority, setPermissions, setPersistTempDirectory, setResourceAlias, setResourceAliases, setServer, setServerClasses, setServletSecurity, setSystemClasses, setTempDirectory, setThrowUnavailableOnStartupException, setWar, setWarResource, startContext, stopContext, toString
addDecorator, addEventListener, addFilter, addFilter, addFilter, addRoles, addServlet, addServlet, addServlet, callContextDestroyed, callContextInitialized, dynamicHolderAdded, getDecorators, getDefaultSecurityHandlerClass, getGzipHandler, getObjectFactory, getSecurityHandler, getServletHandler, getSessionHandler, insertHandler, newSecurityHandler, newServletHandler, newSessionHandler, setDecorators, setDefaultSecurityHandlerClass, setGzipHandler, setHandler, setSecurityHandler, setServletHandler, setSessionHandler
addAliasCheck, addLocaleEncoding, addProgrammaticListener, addVirtualHosts, checkAlias, checkContext, checkContextPath, checkVirtualHost, clearAliasChecks, clearAttributes, doHandle, doScope, enterScope, exitScope, getAliasChecks, getAllowNullPathInfo, getAttribute, getAttributeNames, getAttributes, getBaseResource, getClassLoader, getClassPath, getContextHandler, getContextPath, getContextPathEncoded, getCurrentContext, getDisplayName, getErrorHandler, getEventListeners, getInitParameter, getInitParameterNames, getInitParams, getLocaleEncoding, getLocaleEncoding, getLocaleEncodings, getLogger, getMaxFormContentSize, getMaxFormKeys, getMimeTypes, getProtectedTargets, getResourceBase, getServerInfo, getServletContext, getVirtualHosts, getWelcomeFiles, handle, handle, isAvailable, isCompactPath, isProgrammaticListener, isProtectedTarget, isShutdown, isUsingSecurityManager, loadClass, newResource, newResource, newResource, removeAttribute, removeVirtualHosts, requestDestroyed, requestInitialized, setAliasChecks, setAllowNullPathInfo, setAttribute, setAttributes, setAvailable, setBaseResource, setCompactPath, setContextPath, setErrorHandler, setInitParameter, setLogger, setManagedAttribute, setMaxFormContentSize, setMaxFormKeys, setMimeTypes, setProtectedTargets, setResourceBase, setServerInfo, setUsingSecurityManager, setVirtualHosts, setWelcomeFiles, shutdown
handle, nextHandle, nextScope
expandChildren, getHandler, getHandlers
doShutdown, expandHandler, findContainerOf, getChildHandlerByClass, getChildHandlers, getChildHandlersByClass
doError, getServer
addBean, addBean, addBean, addEventListener, addManaged, contains, dump, dump, dump, dump, dumpBeans, dumpObject, dumpObjects, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeans
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
newResource
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, start, stop, stop
dumpObjects, dumpSelf
private static final Logger LOG
private static final java.lang.String DEFAULT_CONTAINER_INCLUDE_JAR_PATTERN
private static final java.lang.String WEB_INF_CLASSES_PREFIX
private static final java.lang.String WEB_INF_LIB_PREFIX
public static final java.lang.String[] MINIMUM_CONFIGURATION_CLASSES
public static final java.lang.String[] DEFAULT_CONFIGURATION_CLASSES
public static final java.lang.String[] QUICKSTART_CONFIGURATION_CLASSES
private java.io.File _classes
private java.io.File _testClasses
private final java.util.List<java.io.File> _webInfClasses
private final java.util.List<java.io.File> _webInfJars
private final java.util.Map<java.lang.String,java.io.File> _webInfJarMap
private java.util.List<java.io.File> _classpathFiles
private java.lang.String _jettyEnvXml
private java.util.List<Overlay> _overlays
private Resource _quickStartWebXml
private java.lang.String _originAttribute
private boolean _generateOrigin
private java.lang.String _containerIncludeJarPattern
private java.lang.String _webInfIncludeJarPattern
private boolean _baseAppFirst
private boolean _isGenerateQuickStart
private PreconfigureDescriptorProcessor _preconfigProcessor
public JettyWebAppContext() throws java.lang.Exception
java.lang.Exception
public void setContainerIncludeJarPattern(java.lang.String pattern)
public java.lang.String getContainerIncludeJarPattern()
public java.lang.String getWebInfIncludeJarPattern()
public void setWebInfIncludeJarPattern(java.lang.String pattern)
public java.util.List<java.io.File> getClassPathFiles()
public void setJettyEnvXml(java.lang.String jettyEnvXml)
public java.lang.String getJettyEnvXml()
public void setClasses(java.io.File dir)
public java.io.File getClasses()
public void setWebInfLib(java.util.List<java.io.File> jars)
public void setTestClasses(java.io.File dir)
public java.io.File getTestClasses()
public void setOverlays(java.util.List<Overlay> overlays)
overlays
- the list of overlayspublic java.lang.String getOriginAttribute()
public void setOriginAttribute(java.lang.String originAttribute)
originAttribute
- the originAttribute to setpublic boolean isGenerateOrigin()
public void setGenerateOrigin(boolean generateOrigin)
generateOrigin
- the generateOrigin to setpublic java.util.List<Overlay> getOverlays()
public void setBaseAppFirst(boolean value)
public boolean getBaseAppFirst()
public void setQuickStartWebDescriptor(java.lang.String quickStartWebXml) throws java.lang.Exception
java.lang.Exception
protected void setQuickStartWebDescriptor(Resource quickStartWebXml)
public Resource getQuickStartWebDescriptor()
public void setResourceBases(java.lang.String[] resourceBases)
resourceBases
- Array of resources strings to set as a ResourceCollection
. Each resource string may be a comma separated list of resourcesResource
public java.util.List<java.io.File> getWebInfLib()
public java.util.List<java.io.File> getWebInfClasses()
public void setGenerateQuickStart(boolean quickStart)
public boolean isGenerateQuickStart()
protected void startWebapp() throws java.lang.Exception
startWebapp
in class WebAppContext
java.lang.Exception
protected void stopWebapp() throws java.lang.Exception
stopWebapp
in class WebAppContext
java.lang.Exception
public void doStart() throws java.lang.Exception
ContainerLifeCycle
doStart
in class WebAppContext
java.lang.Exception
AbstractHandler.doStart()
protected void loadConfigurations() throws java.lang.Exception
loadConfigurations
in class WebAppContext
java.lang.Exception
public void doStop() throws java.lang.Exception
ContainerLifeCycle
doStop
in class WebAppContext
java.lang.Exception
ContextHandler.doStop()
public Resource getResource(java.lang.String uriInContext) throws java.net.MalformedURLException
getResource
in class WebAppContext
java.net.MalformedURLException
public java.util.Set<java.lang.String> getResourcePaths(java.lang.String path)
getResourcePaths
in class ContextHandler
public java.lang.String addPattern(java.lang.String s, java.lang.String pattern)
public void initCDI()