public class ServletAdaptor extends ServletContainer
Persistence units that may be injected must be configured in web.xml
in the normal way plus an additional servlet parameter to enable the
Jersey servlet to locate them in JNDI. E.g. with the following
persistence unit configuration:
ServletContainer.ContextInjectableProvider<T>
APPLICATION_CONFIG_CLASS, FEATURE_FILTER_FORWARD_ON_404, GLASSFISH_DEFAULT_ERROR_PAGE_RESPONSE, JSP_TEMPLATES_BASE_PATH, PROPERTY_FILTER_CONTEXT_PATH, PROPERTY_WEB_PAGE_CONTENT_REGEX, RESOURCE_CONFIG_CLASS
Constructor and Description |
---|
ServletAdaptor() |
Modifier and Type | Method and Description |
---|---|
protected void |
configure(javax.servlet.ServletConfig servletConfig,
ResourceConfig rc,
WebApplication wa)
Configure the
ResourceConfig for a Servlet. |
configure, configure, create, destroy, doFilter, doFilter, getDefaultResourceConfig, getDefaultResourceConfig, getServletContext, getStaticContentPattern, getWebConfig, init, init, init, initiate, load, reload, service, service
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
protected void configure(javax.servlet.ServletConfig servletConfig, ResourceConfig rc, WebApplication wa)
ServletContainer
ResourceConfig
for a Servlet.
The ResourceConfig
is configured such that the following classes
may be injected onto the field of a root resource class or a parameter
of a method of root resource class that is annotated with
Context
: ServletConfig
.
An inheriting class may override this method to configure the
ResourceConfig
to provide alternative or additional instances
that are resource or provider classes or instances, and may modify the
features and properties of the ResourceConfig
. For an inheriting
class to extend configuration behaviour the overriding method MUST call
super.configure(servletConfig, rc, wa)
as the first statement of that
method.
This method will be called only once at servlet initiation. Subsequent reloads of the Web application will not result in subsequence calls to this method.
configure
in class ServletContainer
servletConfig
- the Servlet configurationrc
- the Resource configurationwa
- the Web applicationCopyright © 2013 Oracle Corporation. All rights reserved.