This handler does not implement the full J2EE features and is intended to
be used when a full web application is not required. Specifically filters
and request wrapping are not supported.
Unless run as part of a Context or derivative, the initialize()
method must be called manually after start().
org.mortbay.jetty.webapp.WebAppContext
| Modifier and Type | Class and Description |
|---|---|
| private class | |
| private class |
| Modifier and Type | Field and Description |
|---|---|
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| protected transient ConcurrentHashMap | |
| private ContextHandler | |
| private boolean | |
| private FilterMapping[] | |
| private transient Map | |
| private transient MultiMap | |
| private transient List | |
| private FilterHolder[] | |
| private int | |
| private ContextHandler. | |
| private ServletMapping[] | |
| private transient Map | |
| private transient PathMap | |
| private ServletHolder[] | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public FilterHolder | |
| public void | addFilter(FilterHolder filter, FilterMapping filterMapping)
convenience method to add a filter and mapping |
| public void | |
| public void | |
| public FilterHolder | Returns: The filter holder.conveniance method to add a filter. |
| public FilterHolder | Returns: The filter holder.conveniance method to add a filter. |
| public void | Returns: The filter holder.conveniance method to add a filter. |
| public ServletHolder | addServlet(String className, String pathSpec)
Deprecated
Convenience method to add a servlet with a servlet mapping.
|
| public void | |
| public void | addServletMapping(ServletMapping mapping)
Convenience method to add a pre-constructed ServletMapping. |
| public ServletHolder | Returns: The servlet holder.conveniance method to add a servlet. |
| public ServletHolder | Returns: The servlet holder.conveniance method to add a servlet. |
| public void | Returns: The servlet holder.conveniance method to add a servlet. |
| public Filter | |
| public Filter | |
| public Servlet | |
| public Servlet | |
| protected synchronized void | |
| protected synchronized void | |
| public Object | |
| public FilterHolder | |
| private FilterChain | |
| public FilterMapping[] | |
| public FilterHolder[] | |
| public PathMap. | Returns: PathMap Entries pathspec to ServletHolderPath within _context. pathInContext)ServletHolder matching path. |
| public int | |
| public RequestDispatcher | Returns: Adispatcher wrapping the resource at uriInContext,
or null if the specified uri cannot be dispatched to.
|
| public ServletHolder | |
| public ServletContext | |
| public ServletMapping[] | |
| public ServletHolder[] | |
| public void | handle(String
The target of the request - either a URI or a name. target, HttpServletRequest The request either as the request, HttpServletResponse Request
object or a wrapper of that request. The HttpConnection#getCurrentConnection()
method can be used access the Request object if required.The response as the response, int type)Response
object or a wrapper of that request. The HttpConnection#getCurrentConnection()
method can be used access the Response object if required.Implements org. |
| public void | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public FilterHolder | |
| public FilterHolder | |
| public ServletHolder | |
| public ServletHolder | |
| protected void | |
| public void | |
| public void | |
| public synchronized void | |
| public void | |
| public void | setMaxFilterChainsCacheSize(int
the maximum number of entries in a filter chain cache. maxFilterChainsCacheSize)Set the maximum filter chain cache size. |
| public void | setServer(Server server)
Overrides org. Implements org. |
| public void | |
| public synchronized void | |
| public void | |
| protected synchronized void | |
| protected synchronized void |
| __DEFAULT_SERVLET | back to summary |
|---|---|
| public static final String __DEFAULT_SERVLET | |
| __J_S_CONTEXT_TEMPDIR | back to summary |
|---|---|
| public static final String __J_S_CONTEXT_TEMPDIR | |
| __J_S_ERROR_EXCEPTION | back to summary |
|---|---|
| public static final String __J_S_ERROR_EXCEPTION | |
| __J_S_ERROR_EXCEPTION_TYPE | back to summary |
|---|---|
| public static final String __J_S_ERROR_EXCEPTION_TYPE | |
| __J_S_ERROR_MESSAGE | back to summary |
|---|---|
| public static final String __J_S_ERROR_MESSAGE | |
| __J_S_ERROR_REQUEST_URI | back to summary |
|---|---|
| public static final String __J_S_ERROR_REQUEST_URI | |
| __J_S_ERROR_SERVLET_NAME | back to summary |
|---|---|
| public static final String __J_S_ERROR_SERVLET_NAME | |
| __J_S_ERROR_STATUS_CODE | back to summary |
|---|---|
| public static final String __J_S_ERROR_STATUS_CODE | |
| _chainCache | back to summary |
|---|---|
| protected transient ConcurrentHashMap<K, V>[] _chainCache | |
| _contextHandler | back to summary |
|---|---|
| private ContextHandler _contextHandler | |
| _filterChainsCached | back to summary |
|---|---|
| private boolean _filterChainsCached | |
| _filterMappings | back to summary |
|---|---|
| private FilterMapping[] _filterMappings | |
| _filterNameMap | back to summary |
|---|---|
| private transient Map<K, V> _filterNameMap | |
| _filterNameMappings | back to summary |
|---|---|
| private transient MultiMap<K> _filterNameMappings | |
| _filterPathMappings | back to summary |
|---|---|
| private transient List<E> _filterPathMappings | |
| _filters | back to summary |
|---|---|
| private FilterHolder[] _filters | |
| _maxFilterChainsCacheSize | back to summary |
|---|---|
| private int _maxFilterChainsCacheSize | |
| _servletContext | back to summary |
|---|---|
| private ContextHandler. | |
| _servletMappings | back to summary |
|---|---|
| private ServletMapping[] _servletMappings | |
| _servletNameMap | back to summary |
|---|---|
| private transient Map<K, V> _servletNameMap | |
| _servletPathMap | back to summary |
|---|---|
| private transient PathMap _servletPathMap | |
| _servlets | back to summary |
|---|---|
| private ServletHolder[] _servlets | |
| _startWithUnavailable | back to summary |
|---|---|
| private boolean _startWithUnavailable | |
| ServletHandler | back to summary |
|---|---|
| public ServletHandler() Constructor. | |
| addFilter | back to summary |
|---|---|
| public FilterHolder addFilter(String className, String pathSpec, int dispatches)
Deprecated
Convenience method to add a filter with a mapping | |
| addFilter | back to summary |
|---|---|
| public void addFilter(FilterHolder filter, FilterMapping filterMapping) convenience method to add a filter and mapping | |
| addFilter | back to summary |
|---|---|
| public void addFilter(FilterHolder filter) Convenience method to add a preconstructed FilterHolder | |
| addFilterMapping | back to summary |
|---|---|
| public void addFilterMapping(FilterMapping mapping) Convenience method to add a preconstructed FilterMapping | |
| addFilterWithMapping | back to summary |
|---|---|
| public FilterHolder addFilterWithMapping(Class<T> filter, String pathSpec, int dispatches) conveniance method to add a filter.
| |
| addFilterWithMapping | back to summary |
|---|---|
| public FilterHolder addFilterWithMapping(String className, String pathSpec, int dispatches) conveniance method to add a filter.
| |
| addFilterWithMapping | back to summary |
|---|---|
| public void addFilterWithMapping(FilterHolder holder, String pathSpec, int dispatches) conveniance method to add a filter.
| |
| addServlet | back to summary |
|---|---|
| public ServletHolder addServlet(String className, String pathSpec)
Deprecated
Convenience method to add a servlet with a servlet mapping. | |
| addServlet | back to summary |
|---|---|
| public void addServlet(ServletHolder holder) Convenience method to add a pre-constructed ServletHolder. | |
| addServletMapping | back to summary |
|---|---|
| public void addServletMapping(ServletMapping mapping) Convenience method to add a pre-constructed ServletMapping. | |
| addServletWithMapping | back to summary |
|---|---|
| public ServletHolder addServletWithMapping(String className, String pathSpec) conveniance method to add a servlet.
| |
| addServletWithMapping | back to summary |
|---|---|
| public ServletHolder addServletWithMapping(Class<T> servlet, String pathSpec) conveniance method to add a servlet.
| |
| addServletWithMapping | back to summary |
|---|---|
| public void addServletWithMapping(ServletHolder servlet, String pathSpec) conveniance method to add a servlet.
| |
| customizeFilter | back to summary |
|---|---|
| public Filter customizeFilter(Filter filter) throws Exception Customize a Filter. Called before the Filter goes into service. Subclasses of ServletHandler should override this method. | |
| customizeFilterDestroy | back to summary |
|---|---|
| public Filter customizeFilterDestroy(Filter filter) throws Exception | |
| customizeServlet | back to summary |
|---|---|
| public Servlet customizeServlet(Servlet servlet) throws Exception Customize a servlet. Called before the servlet goes into service. Subclasses of ServletHandler should override this method. | |
| customizeServletDestroy | back to summary |
|---|---|
| public Servlet customizeServletDestroy(Servlet servlet) throws Exception | |
| doStart | back to summary |
|---|---|
| protected synchronized void doStart() throws Exception Overrides org. | |
| doStop | back to summary |
|---|---|
| protected synchronized void doStop() throws Exception | |
| getContextLog | back to summary |
|---|---|
public Object getContextLog()
| |
| getFilter | back to summary |
|---|---|
| public FilterHolder getFilter(String name) | |
| getFilterChain | back to summary |
|---|---|
| private FilterChain getFilterChain(int requestType, String pathInContext, ServletHolder servletHolder, boolean initial) | |
| getFilterMappings | back to summary |
|---|---|
public FilterMapping[] getFilterMappings()
| |
| getFilters | back to summary |
|---|---|
| public FilterHolder[] getFilters() Get Filters.
| |
| getHolderEntry | back to summary |
|---|---|
| public PathMap. ServletHolder matching path. | |
| getMaxFilterChainsCacheSize | back to summary |
|---|---|
public int getMaxFilterChainsCacheSize()
| |
| getRequestDispatcher | back to summary |
|---|---|
public RequestDispatcher getRequestDispatcher(String uriInContext)
| |
| getServlet | back to summary |
|---|---|
| public ServletHolder getServlet(String name) | |
| getServletContext | back to summary |
|---|---|
| public ServletContext getServletContext() | |
| getServletMappings | back to summary |
|---|---|
public ServletMapping[] getServletMappings()
| |
| getServlets | back to summary |
|---|---|
| public ServletHolder[] getServlets() Get Servlets.
| |
| handle | back to summary |
|---|---|
| public void handle(String target, HttpServletRequest request, HttpServletResponse response, int type) throws IOException, ServletException Implements org. Doc from org. Handle a request.
| |
| initialize | back to summary |
|---|---|
| public void initialize() throws Exception Initialize filters and load-on-startup servlets. Called automatically from start if autoInitializeServlet is true. | |
| isAvailable | back to summary |
|---|---|
public boolean isAvailable()
| |
| isFilterChainsCached | back to summary |
|---|---|
public boolean isFilterChainsCached()
| |
| isInitializeAtStart | back to summary |
|---|---|
| public boolean isInitializeAtStart()
Deprecated
| |
| isStartWithUnavailable | back to summary |
|---|---|
public boolean isStartWithUnavailable()
| |
| newFilterHolder | back to summary |
|---|---|
| public FilterHolder newFilterHolder(Class<T> filter) | |
| newFilterHolder | back to summary |
|---|---|
public FilterHolder newFilterHolder()
| |
| newServletHolder | back to summary |
|---|---|
public ServletHolder newServletHolder()
| |
| newServletHolder | back to summary |
|---|---|
| public ServletHolder newServletHolder(Class<T> servlet) | |
| notFound | back to summary |
|---|---|
| protected void notFound(HttpServletRequest request, HttpServletResponse response) throws IOException | |
| setFilterChainsCached | back to summary |
|---|---|
public void setFilterChainsCached(boolean filterChainsCached)
| |
| setFilterMappings | back to summary |
|---|---|
public void setFilterMappings(FilterMapping[] filterMappings)
| |
| setFilters | back to summary |
|---|---|
| public synchronized void setFilters(FilterHolder[] holders) | |
| setInitializeAtStart | back to summary |
|---|---|
| public void setInitializeAtStart(boolean initializeAtStart)
Deprecated
| |
| setMaxFilterChainsCacheSize | back to summary |
|---|---|
| public void setMaxFilterChainsCacheSize(int maxFilterChainsCacheSize) Set the maximum filter chain cache size.
Filter chains are cached if
| |
| setServer | back to summary |
|---|---|
| public void setServer(Server server) Overrides org. Implements org. | |
| setServletMappings | back to summary |
|---|---|
public void setServletMappings(ServletMapping[] servletMappings)
| |
| setServlets | back to summary |
|---|---|
| public synchronized void setServlets(ServletHolder[] holders) Set Servlets.
| |
| setStartWithUnavailable | back to summary |
|---|---|
public void setStartWithUnavailable(boolean start)
| |
| updateMappings | back to summary |
|---|---|
| protected synchronized void updateMappings() | |
| updateNameMappings | back to summary |
|---|---|
| protected synchronized void updateNameMappings() | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv FilterHolder | |
| pack-priv ServletHandler. | |
| pack-priv ServletHolder |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | doFilter(ServletRequest
the request to pass along the chain. request, ServletResponse the response to pass along the chain. response)Implements javax. |
| public String |
| _filterHolder | back to summary |
|---|---|
| pack-priv FilterHolder _filterHolder | |
| _next | back to summary |
|---|---|
| pack-priv ServletHandler. | |
| _servletHolder | back to summary |
|---|---|
| pack-priv ServletHolder _servletHolder | |
| CachedChain | back to summary |
|---|---|
| pack-priv CachedChain(Object filters, ServletHolder servletHolder) | |
| doFilter | back to summary |
|---|---|
| public void doFilter(ServletRequest request, ServletResponse response) throws IOException, ServletException Implements javax. Doc from javax. Causes the next filter in the chain to be invoked, or if the calling filter is the last filter in the chain, causes the resource at the end of the chain to be invoked.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv Object | |
| pack-priv int | |
| pack-priv ServletHolder |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | doFilter(ServletRequest
the request to pass along the chain. request, ServletResponse the response to pass along the chain. response)Implements javax. |
| public String |
| _chain | back to summary |
|---|---|
| pack-priv Object _chain | |
| _filter | back to summary |
|---|---|
| pack-priv int _filter | |
| _servletHolder | back to summary |
|---|---|
| pack-priv ServletHolder _servletHolder | |
| Chain | back to summary |
|---|---|
| pack-priv Chain(Object filters, ServletHolder servletHolder) | |
| doFilter | back to summary |
|---|---|
| public void doFilter(ServletRequest request, ServletResponse response) throws IOException, ServletException Implements javax. Doc from javax. Causes the next filter in the chain to be invoked, or if the calling filter is the last filter in the chain, causes the resource at the end of the chain to be invoked.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
| |