| |
|
| org.mortbay.jetty.handler.AbstractHandler org.mortbay.jetty.handler.AbstractHandlerContainer org.mortbay.jetty.handler.HandlerWrapper org.mortbay.jetty.handler.ContextHandler
All known Subclasses: org.mortbay.jetty.handler.MovedContextHandler, org.mortbay.jetty.servlet.Context,
ContextHandler | public class ContextHandler extends HandlerWrapper implements Attributes(Code) | | ContextHandler.
This handler wraps a call to handle by setting the context and
servlet path, plus setting the context classloader.
Note. Because of http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4425695
directly replacing war or jar files in a context is not supported.
You should use classes instead of jars if they will change, or deploy
a packed war file that gets extracted on deployment.
author: gregw |
_scontext | protected SContext _scontext(Code) | | |
ContextHandler | public ContextHandler()(Code) | | |
ContextHandler | protected ContextHandler(SContext context)(Code) | | |
ContextHandler | public ContextHandler(String contextPath)(Code) | | |
clearAttributes | public void clearAttributes()(Code) | | |
getBaseResource | public Resource getBaseResource()(Code) | | Returns the resourceBase. |
getClassPath | public String getClassPath()(Code) | | Make best effort to extract a file classpath from the context classloader
Returns the classLoader. |
getConnectorNames | public String[] getConnectorNames()(Code) | | an array of connector names that this contextwill accept a request from. |
getContextPath | public String getContextPath()(Code) | | Returns the _contextPath. |
getCurrentContext | public static SContext getCurrentContext()(Code) | | Get the current ServletContext implementation.
This call is only valid during a call to doStart and is available to
nested handlers to access the context.
ServletContext implementation |
getHosts | public String[] getHosts()(Code) | | Get the hosts for the context.
|
getInitParams | public Map getInitParams()(Code) | | Returns the initParams. |
getLocaleEncoding | public String getLocaleEncoding(Locale locale)(Code) | | Get the character encoding for a locale. The full locale name is first
looked up in the map of encodings. If no encoding is found, then the
locale language is looked up.
Parameters: locale - a Locale value a String representing the character encoding forthe locale or null if none found. |
getMaxFormContentSize | public int getMaxFormContentSize()(Code) | | |
getResourceBase | public String getResourceBase()(Code) | | Returns the base resource as a string. |
getServletContext | public SContext getServletContext()(Code) | | |
getVirtualHosts | public String[] getVirtualHosts()(Code) | | Get the virtual hosts for the context.
Only requests that have a matching host header or fully qualified
URL will be passed to that context with a virtual host name.
A context with no virtual host names or a null virtual host name is
available to all requests that are not served by a context with a
matching virtual host name.
Array of virtual hosts that this context responds to. Anull host name or empty array means any hostname is acceptable.Host names may be String representation of IP addresses. |
isShutdown | public boolean isShutdown()(Code) | | true if this context is accepting new requests |
removeAttribute | public void removeAttribute(String name)(Code) | | |
setAttributes | public void setAttributes(Attributes attributes)(Code) | | Parameters: attributes - The attributes to set. |
setBaseResource | public void setBaseResource(Resource base)(Code) | | Parameters: base - The resourceBase to set. |
setClassLoader | public void setClassLoader(ClassLoader classLoader)(Code) | | Parameters: classLoader - The classLoader to set. |
setConnectorNames | public void setConnectorNames(String[] connectors)(Code) | | Set the names of accepted connectors.
Names are either "host:port" or a specific configured name for a connector.
Parameters: connectors - If non null, an array of connector names that this contextwill accept a request from. |
setContextPath | public void setContextPath(String contextPath)(Code) | | Parameters: contextPath - The _contextPath to set. |
setDisplayName | public void setDisplayName(String servletContextName)(Code) | | Parameters: servletContextName - The servletContextName to set. |
setErrorHandler | public void setErrorHandler(ErrorHandler errorHandler)(Code) | | Parameters: errorHandler - The errorHandler to set. |
setInitParams | public void setInitParams(Map initParams)(Code) | | Parameters: initParams - The initParams to set. |
setMaxFormContentSize | public void setMaxFormContentSize(int maxSize)(Code) | | |
setMimeTypes | public void setMimeTypes(MimeTypes mimeTypes)(Code) | | Parameters: mimeTypes - The mimeTypes to set. |
setResourceBase | public void setResourceBase(String resourceBase)(Code) | | Parameters: resourceBase - The base resource as a string. |
setShutdown | public void setShutdown(boolean shutdown)(Code) | | Set shutdown status.
This field allows for graceful shutdown of a context. A started context may be put into non accepting state so
that existing requests can complete, but no new requests are accepted.
Parameters: accepting - true if this context is accepting new requests |
setVirtualHosts | public void setVirtualHosts(String[] vhosts)(Code) | | Set the virtual hosts for the context.
Only requests that have a matching host header or fully qualified
URL will be passed to that context with a virtual host name.
A context with no virtual host names or a null virtual host name is
available to all requests that are not served by a context with a
matching virtual host name.
Parameters: vhosts - Array of virtual hosts that this context responds to. Anull host name or null/empty array means any hostname is acceptable.Host names may String representation of IP addresses. |
setWelcomeFiles | public void setWelcomeFiles(String[] files)(Code) | | |
|
|
|