Class ServletProperties
- Author:
- Marek Potociar
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
If set, indicates the URL pattern of the Jersey servlet filter context path.static final String
If set totrue
and a 404 response with no entity body is returned from either the runtime or the application then the runtime forwards the request to the next filter in the filter chain.static final String
If set the regular expression is used to match an incoming servlet path URI to some web page content such as static resources or JSPs to be handled by the underlying servlet engine.static final String
Application configuration initialization property whose value is a fully qualified class name of a class that implementsApplication
.static final String
Indicates that Jersey should scan the whole web app for application-specific resources and providers.static final String
Iftrue
then query parameters will not be treated as form parameters (e.g. injectable usingFormParam
) in case a Form request is processed by server.static final String
Identifies the object that will be used as a parentHK2 ServiceLocator
in the JerseyWebComponent
. -
Method Summary
-
Field Details
-
FILTER_CONTEXT_PATH
If set, indicates the URL pattern of the Jersey servlet filter context path.If the URL pattern of a filter is set to a base path and a wildcard, such as "/base/*", then this property can be used to declare a filter context path that behaves in the same manner as the Servlet context path for determining the base URI of the application. (Note that with the Servlet 2.x API it is not possible to determine the URL pattern without parsing the
web.xml
, hence why this property is necessary.)The property is only applicable when
Jersey servlet container
is configured to run as aFilter
, otherwise this property will be ignored.The value of the property may consist of one or more path segments separate by
A default value is not set. The name of the configuration property is "jersey.config.servlet.filter.contextPath".'/'
.- See Also:
-
FILTER_FORWARD_ON_404
If set totrue
and a 404 response with no entity body is returned from either the runtime or the application then the runtime forwards the request to the next filter in the filter chain. This enables another filter or the underlying servlet engine to process the request. Before the request is forwarded the response status is set to 200.This property is an alternative to setting a
The property is only applicable whenstatic content regular expression
and requires less configuration. However, application code, such as methods corresponding to sub-resource locators, may be invoked when this feature is enabled.Jersey servlet container
is configured to run as aFilter
, otherwise this property will be ignored. Application code, such as methods corresponding to sub-resource locators may be invoked when this feature is enabled.The default value is
The name of the configuration property is "jersey.config.servlet.filter.forwardOn404".false
.- See Also:
-
FILTER_STATIC_CONTENT_REGEX
If set the regular expression is used to match an incoming servlet path URI to some web page content such as static resources or JSPs to be handled by the underlying servlet engine. The property is only applicable whenJersey servlet container
is configured to run as aFilter
, otherwise this property will be ignored. If a servlet path matches this regular expression then the filter forwards the request to the next filter in the filter chain so that the underlying servlet engine can process the request otherwise Jersey will process the request. For example if you set the value to/(image|css)/.*
then you can serve up images and CSS files for your Implicit or Explicit Views while still processing your JAX-RS resources. The type of this property must be a String and the value must be a valid regular expression. A default value is not set. The name of the configuration property is "jersey.config.servlet.filter.staticContentRegex".- See Also:
-
JAXRS_APPLICATION_CLASS
Application configuration initialization property whose value is a fully qualified class name of a class that implementsApplication
. A default value is not set. The name of the configuration property is "jakarta.ws.rs.Application".- See Also:
-
PROVIDER_WEB_APP
Indicates that Jersey should scan the whole web app for application-specific resources and providers. If the property is present and the value is notfalse
, the whole web app will be scanned for JAX-RS root resources (annotated with@Path
) and providers (annotated with@Provider
). The property value MUST be an instance ofString
. The allowed values aretrue
andfalse
. A default value is not set. The name of the configuration property is "jersey.config.servlet.provider.webapp".- See Also:
-
QUERY_PARAMS_AS_FORM_PARAMS_DISABLED
Iftrue
then query parameters will not be treated as form parameters (e.g. injectable usingFormParam
) in case a Form request is processed by server.The default value is
false
.The name of the configuration property is "jersey.config.servlet.form.queryParams.disabled".
- Since:
- 2.16
- See Also:
-
SERVICE_LOCATOR
Identifies the object that will be used as a parentHK2 ServiceLocator
in the JerseyWebComponent
. This property gives a possibility to use HK2 services that are registered and/or created outside of the Jersey server context. By default this property is not set. The name of the configuration property is "jersey.config.servlet.context.serviceLocator".- See Also:
-