| org.mortbay.jetty.handler.ContextHandler org.mortbay.jetty.servlet.Context org.mortbay.jetty.webapp.WebAppContext
Method Summary | |
public void | addEventListener(EventListener listener) | public static void | addWebApplications(Server server, String webapps, String defaults, boolean extract, boolean java2CompliantClassLoader) Add Web Applications.
Add auto webapplications to the server. | public static void | addWebApplications(Server server, String webapps, String defaults, String[] configurations, boolean extract, boolean java2CompliantClassLoader) Add Web Applications.
Add auto webapplications to the server. | public static void | addWebApplications(HandlerContainer contexts, String webapps, String defaults, boolean extract, boolean java2CompliantClassLoader) Add Web Applications.
Add auto webapplications to the server. | public static void | addWebApplications(HandlerContainer contexts, String webapps, String defaults, String[] configurations, boolean extract, boolean java2CompliantClassLoader) Add Web Applications.
Add auto webapplications to the server. | protected void | doStart() | protected void | doStop() | public String[] | getConfigurationClasses() | public Configuration[] | getConfigurations() | public static WebAppContext | getCurrentWebAppContext() | public String | getDefaultsDescriptor() | public String | getDescriptor() the web.xml descriptor to use. | public String | getExtraClasspath() Comma or semicolon separated path of filenames or URLspointing to directories or jar files. | public String | getOverrideDescriptor() | public PermissionCollection | getPermissions() | public Resource | getResource(String uriInContext) | public String | getResourceAlias(String alias) | public Map | getResourceAliases() | public String[] | getServerClasses() | public String[] | getSystemClasses() | public File | getTempDirectory() Get a temporary directory in which to unpack the war etc etc.
The algorithm for determining this is to check these alternatives
in the order shown:
A. | public String | getWar() | public Resource | getWebInf() | public void | handle(String target, HttpServletRequest request, HttpServletResponse response, int dispatch) | public boolean | isCopyWebDir() | public boolean | isDistributable() | public boolean | isExtractWAR() | public boolean | isParentLoaderPriority() | protected boolean | isProtectedTarget(String target) | public boolean | isTempWorkDirectory() Check if the _tmpDir itself is called "work", or if the _tmpDir
is in a directory called "work". | protected void | loadConfigurations() | public String | removeResourceAlias(String alias) | protected void | resolveWebApp() Resolve Web App directory
If the BaseResource has not been set, use the war resource to
derive a webapp resource (expanding WAR if required). | public void | setConfigurationClasses(String[] configurations) Parameters: configurations - The configuration class names. | public void | setConfigurations(Configuration[] configurations) | public void | setCopyWebDir(boolean copy) | public void | setDefaultsDescriptor(String defaultsDescriptor) | public void | setDescriptor(String descriptor) Parameters: descriptor - the web.xml descriptor to use. | public void | setDistributable(boolean distributable) | public void | setEventListeners(EventListener[] eventListeners) | public void | setExtraClasspath(String extraClasspath) Parameters: extraClasspath - Comma or semicolon separated path of filenames or URLspointing to directories or jar files. | public void | setExtractWAR(boolean extractWAR) | public void | setOverrideDescriptor(String overrideDescriptor) | public void | setParentLoaderPriority(boolean java2compliant) | public void | setPermissions(PermissionCollection permissions) | public void | setResourceAlias(String alias, String uri) 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. | public void | setResourceAliases(Map map) | public void | setSecurityHandler(SecurityHandler securityHandler) | public void | setServerClasses(String[] serverClasses) | public void | setServletHandler(ServletHandler servletHandler) | public void | setSessionHandler(SessionHandler sessionHandler) | public void | setSystemClasses(String[] systemClasses) | public void | setTempDirectory(File dir) Set temporary directory for context. | public void | setWar(String war) | protected void | startContext() | public String | toString() |
WEB_DEFAULTS_XML | final public static String WEB_DEFAULTS_XML(Code) | | |
WebAppContext | public WebAppContext()(Code) | | |
WebAppContext | public WebAppContext(String webApp, String contextPath)(Code) | | Parameters: contextPath - The context path Parameters: webApp - The URL or filename of the webapp directory or war file. |
WebAppContext | public WebAppContext(HandlerContainer parent, String webApp, String contextPath)(Code) | | Parameters: parent - The parent HandlerContainer. Parameters: contextPath - The context path Parameters: webApp - The URL or filename of the webapp directory or war file. |
addWebApplications | public static void addWebApplications(Server server, String webapps, String defaults, boolean extract, boolean java2CompliantClassLoader) throws IOException(Code) | | Add Web Applications.
Add auto webapplications to the server. The name of the
webapp directory or war is used as the context name. If the
webapp matches the rootWebApp it is added as the "/" context.
Parameters: server - Must not be null Parameters: webapps - Directory file name or URL to look for autowebapplication. Parameters: defaults - The defaults xml filename or URL which isloaded before any in the web app. Must respect the web.dtd.If null the default defaults file is used. If the empty string, thenno defaults file is used. Parameters: extract - If true, extract war files Parameters: java2CompliantClassLoader - True if java2 compliance is applied to all webapplications exception: IOException - org.mortbay.jetty.deployer.WebAppDeployerorg.mortbay.jetty.deployer.ContextDeployer |
addWebApplications | public static void addWebApplications(Server server, String webapps, String defaults, String[] configurations, boolean extract, boolean java2CompliantClassLoader) throws IOException(Code) | | Add Web Applications.
Add auto webapplications to the server. The name of the
webapp directory or war is used as the context name. If the
webapp matches the rootWebApp it is added as the "/" context.
Parameters: server - Must not be null . Parameters: webapps - Directory file name or URL to look for autowebapplication. Parameters: defaults - The defaults xml filename or URL which isloaded before any in the web app. Must respect the web.dtd.If null the default defaults file is used. If the empty string, thenno defaults file is used. Parameters: configurations - Array of classnames of Configuration implementations to apply. Parameters: extract - If true, extract war files Parameters: java2CompliantClassLoader - True if java2 compliance is applied to all webapplications exception: IOException - throws: IllegalAccessException - throws: InstantiationException - org.mortbay.jetty.deployer.WebAppDeployerorg.mortbay.jetty.deployer.ContextDeployer |
addWebApplications | public static void addWebApplications(HandlerContainer contexts, String webapps, String defaults, boolean extract, boolean java2CompliantClassLoader) throws IOException(Code) | | Add Web Applications.
Add auto webapplications to the server. The name of the
webapp directory or war is used as the context name. If the
webapp is called "root" it is added as the "/" context.
Parameters: contexts - A HandlerContainer to which the contexts will be added Parameters: webapps - Directory file name or URL to look for autowebapplication. Parameters: defaults - The defaults xml filename or URL which isloaded before any in the web app. Must respect the web.dtd.If null the default defaults file is used. If the empty string, thenno defaults file is used. Parameters: configurations - Array of classnames of Configuration implementations to apply. Parameters: extract - If true, extract war files Parameters: java2CompliantClassLoader - True if java2 compliance is applied to all webapplications exception: IOException - throws: IllegalAccessException - throws: InstantiationException - WebAppDeployerContextDeployer |
addWebApplications | public static void addWebApplications(HandlerContainer contexts, String webapps, String defaults, String[] configurations, boolean extract, boolean java2CompliantClassLoader) throws IOException(Code) | | Add Web Applications.
Add auto webapplications to the server. The name of the
webapp directory or war is used as the context name. If the
webapp is called "root" it is added as the "/" context.
Parameters: contexts - A HandlerContainer to which the contexts will be added Parameters: webapps - Directory file name or URL to look for autowebapplication. Parameters: defaults - The defaults xml filename or URL which isloaded before any in the web app. Must respect the web.dtd.If null the default defaults file is used. If the empty string, thenno defaults file is used. Parameters: configurations - Array of classnames of Configuration implementations to apply. Parameters: extract - If true, extract war files Parameters: java2CompliantClassLoader - True if java2 compliance is applied to all webapplications exception: IOException - throws: IllegalAccessException - throws: InstantiationException - WebAppDeployerContextDeployer |
getConfigurationClasses | public String[] getConfigurationClasses()(Code) | | Returns the configurations. |
getDefaultsDescriptor | public String getDefaultsDescriptor()(Code) | | The default descriptor is a web.xml format file that is applied to the context before the standard WEB-INF/web.xml
Returns the defaultsDescriptor. |
getDescriptor | public String getDescriptor()(Code) | | the web.xml descriptor to use. If set to null, WEB-INF/web.xml is used if it exists. |
getExtraClasspath | public String getExtraClasspath()(Code) | | Comma or semicolon separated path of filenames or URLspointing to directories or jar files. Directories should endwith '/'. |
getOverrideDescriptor | public String getOverrideDescriptor()(Code) | | The override descriptor is a web.xml format file that is applied to the context after the standard WEB-INF/web.xml
Returns the Override Descriptor. |
getResourceAliases | public Map getResourceAliases()(Code) | | |
getServerClasses | public String[] getServerClasses()(Code) | | Returns the serverClasses. |
getSystemClasses | public String[] getSystemClasses()(Code) | | Returns the systemClasses. |
getTempDirectory | public File getTempDirectory()(Code) | | Get a temporary directory in which to unpack the war etc etc.
The algorithm for determining this is to check these alternatives
in the order shown:
A. Try to use an explicit directory specifically for this webapp:
-
Iff an explicit directory is set for this webapp, use it. Do NOT set
delete on exit.
-
Iff javax.servlet.context.tempdir context attribute is set for
this webapp && exists && writeable, then use it. Do NOT set delete on exit.
B. Create a directory based on global settings. The new directory
will be called "Jetty_"+host+"_"+port+"__"+context+"_"+virtualhost
Work out where to create this directory:
-
Iff $(jetty.home)/work exists create the directory there. Do NOT
set delete on exit. Do NOT delete contents if dir already exists.
-
Iff WEB-INF/work exists create the directory there. Do NOT set
delete on exit. Do NOT delete contents if dir already exists.
-
Else create dir in $(java.io.tmpdir). Set delete on exit. Delete
contents if dir already exists.
|
getWar | public String getWar()(Code) | | Returns the war as a file or URL string (Resource) |
isCopyWebDir | public boolean isCopyWebDir()(Code) | | True if the webdir is copied (to allow hot replacement of jars) |
isDistributable | public boolean isDistributable()(Code) | | Returns the distributable. |
isExtractWAR | public boolean isExtractWAR()(Code) | | Returns the extractWAR. |
isParentLoaderPriority | public boolean isParentLoaderPriority()(Code) | | Returns the java2compliant. |
isProtectedTarget | protected boolean isProtectedTarget(String target)(Code) | | |
isTempWorkDirectory | public boolean isTempWorkDirectory()(Code) | | Check if the _tmpDir itself is called "work", or if the _tmpDir
is in a directory called "work".
|
loadConfigurations | protected void loadConfigurations() throws Exception(Code) | | |
resolveWebApp | protected void resolveWebApp() throws IOException(Code) | | Resolve Web App directory
If the BaseResource has not been set, use the war resource to
derive a webapp resource (expanding WAR if required).
|
setConfigurationClasses | public void setConfigurationClasses(String[] configurations)(Code) | | Parameters: configurations - The configuration class names. If setConfigurations is not calledthese classes are used to create a configurations array. |
setConfigurations | public void setConfigurations(Configuration[] configurations)(Code) | | Parameters: configurations - The configurations to set. |
setCopyWebDir | public void setCopyWebDir(boolean copy)(Code) | | Parameters: copy - True if the webdir is copied (to allow hot replacement of jars) |
setDefaultsDescriptor | public void setDefaultsDescriptor(String defaultsDescriptor)(Code) | | 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. |
setDescriptor | public void setDescriptor(String descriptor)(Code) | | 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)(Code) | | Parameters: distributable - The distributable to set. |
setExtraClasspath | public void setExtraClasspath(String extraClasspath)(Code) | | Parameters: extraClasspath - Comma or semicolon separated path of filenames or URLspointing to directories or jar files. Directories should endwith '/'. |
setExtractWAR | public void setExtractWAR(boolean extractWAR)(Code) | | Parameters: extractWAR - True if war files are extracted |
setOverrideDescriptor | public void setOverrideDescriptor(String overrideDescriptor)(Code) | | The override descriptor is a web.xml format file that is applied to the context after the standard WEB-INF/web.xml
Parameters: defaultsDescriptor - The overrideDescritpor to set. |
setParentLoaderPriority | public void setParentLoaderPriority(boolean java2compliant)(Code) | | Parameters: java2compliant - The java2compliant to set. |
setResourceAlias | public void setResourceAlias(String alias, String uri)(Code) | | 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 - Parameters: uri - |
setResourceAliases | public void setResourceAliases(Map map)(Code) | | |
setServerClasses | public void setServerClasses(String[] serverClasses)(Code) | | Parameters: serverClasses - The serverClasses to set. |
setServletHandler | public void setServletHandler(ServletHandler servletHandler)(Code) | | Parameters: servletHandler - The servletHandler to set. |
setSessionHandler | public void setSessionHandler(SessionHandler sessionHandler)(Code) | | Parameters: sessionHandler - The sessionHandler to set. |
setSystemClasses | public void setSystemClasses(String[] systemClasses)(Code) | | Parameters: systemClasses - The systemClasses to set. |
setTempDirectory | public void setTempDirectory(File dir)(Code) | | Set temporary directory for context.
The javax.servlet.context.tempdir attribute is also set.
Parameters: dir - Writable temporary directory. |
setWar | public void setWar(String war)(Code) | | Parameters: war - The war to set as a file name or URL |
Fields inherited from org.mortbay.jetty.handler.ContextHandler | protected SContext _scontext(Code)(Java Doc)
|
|
|