Jakarta RESTful Web Services - 4.0
Specification Assertion Detail

TotalsTotalActiveDeprecatedRemoved
# of Assertions 24123904
# of Required Assertions 23823604
# of Optional Assertions 3300

IDChapterSectionDescriptionRequiredDependencyImplementation SpecificDefined byStatusTestable
JAXRS:SPEC:131.2Root resource classes are instantiated by the RESTful Web Services runtime and MUST have a public constructor for which the RESTful Web Services runtime can provide all parameter values. Note that a zero argument constructor is permissible under this rule. true
falsetechnologyactivetrue
JAXRS:SPEC:231.2If more than one public constructor is suitable then an implementation MUST use the one with the most parameters. true
falsetechnologyactivetrue
JAXRS:SPEC:332When a resource class is instantiated, the values of fields and bean properties annotated with one the following annotations are set according to the semantics of the annotation: true
falsetechnologyactivetrue
JAXRS:SPEC:3.132@MatrixParam Extracts the value of a URI matrix parameter.true
falsetechnologyactivetrue
JAXRS:SPEC:3.232@QueryParam Extracts the value of a URI query parameter.true
falsetechnologyactivetrue
JAXRS:SPEC:3.332@PathParam Extracts the value of a URI template parameter. true
falsetechnologyactivetrue
JAXRS:SPEC:3.432@CookieParam Extracts the value of a cookie.true
falsetechnologyactivetrue
JAXRS:SPEC:3.532@HeaderParam Extracts the value of a header.true
falsetechnologyactivetrue
JAXRS:SPEC:3.632@Context Injects an instance of a supported resource, true
falsetechnologyactivetrue
JAXRS:SPEC:432An implementation is only required to set the annotated field and bean property values of instances created by the implementation runtime. Objects returned by sub-resource locators (see section 3.4.1) are expected to be initialized by their creator and field and bean properties are not modified by the implementation runtime. true
falsetechnologyactivetrue
JAXRS:SPEC:532Valid parameter types for each of the above annotations are listed in the corresponding Javadoc, however in general (excluding @Context) the following types are supported: true
falsetechnologyactivetrue
JAXRS:SPEC:5.132Primitive types.true
falsetechnologyactivetrue
JAXRS:SPEC:5.232Types that have a constructor that accepts a single String argument.true
falsetechnologyactivetrue
JAXRS:SPEC:5.332Types that have a static method named valueOf or fromString with a single String argument. true
falsetechnologyactivetrue
JAXRS:SPEC:5.432List<T>, Set<T>, or SortedSet<T>, where T satisfies 2 or 3 above.true
falsetechnologyactivetrue
JAXRS:SPEC:5.532If both methods are present then valueOf MUST be used unless the type is an enum in which case fromString MUST be used.true
falsetechnologyactivetrue
JAXRS:SPEC:5.632Types for which a ParamConverter is available via a registered ParamConverterProvidertrue
falsetechnologyactivetrue
JAXRS:SPEC:632The DefaultValue annotation may be used to supply a default value for some of the above, see the Javadoc for DefaultValue for usage details and rules for generating a value in the absence of this annotation and the requested data. true
falsetechnologyactivetrue
JAXRS:SPEC:732The Encoded annotation may be used to disable automatic URI decoding for @MatrixParam, @QueryParam, and @PathParam annotated fields and properties. true
falsetechnologyactivetrue
JAXRS:SPEC:832A WebApplicationException thrown during construction of field or property values using 3 or 4 above is processed directly as described in section 3.3.4. true
falsetechnologyactivetrue
JAXRS:SPEC:932Other exceptions thrown during construction of field or property values using 3 or 4 above are treated as client errors: true
falsetechnologyactivetrue
JAXRS:SPEC:9.132if the field or property is annotated with @MatrixParam, @QueryParam or @PathParam then an implementation MUST generate a WebApplicationException that wraps the thrown exception with a not found response (404 status) and no entity;true
falsetechnologyactivetrue
JAXRS:SPEC:9.232 if the field or property is annotated with @HeaderParam or @CookieParam then an implementation MUST generate a WebApplicationException that wraps the thrown exception with a client error response (400 status) and no entity.true
falsetechnologyactivetrue
JAXRS:SPEC:1032Exceptions MUST be processed as described in section 3.3.4. true
falsetechnologyactivetrue
JAXRS:SPEC:1133.1Only public methods may be exposed as resource methods. true
falsetechnologyactivetrue
JAXRS:SPEC:1233.2When a resource method is invoked, parameters annotated with @FormParam or one of the annotations listed in section 3.2 are mapped from the request according to the semantics of the annotation. Similar to fields and bean properties: true
falsetechnologyactivetrue
JAXRS:SPEC:12.133.2 The DefaultValue annotation may be used to supply a default value for parameterstrue
falsetechnologyactivetrue
JAXRS:SPEC:12.233.2The Encoded annotation may be used to disable automatic URI decoding of parameter valuestrue
falsetechnologyactivetrue
JAXRS:SPEC:12.333.2Exceptions thrown during construction of parameter values are treated the same as exceptions thrown during construction of field or bean property values, see section 3.2.true
falsetechnologyactivetrue
JAXRS:SPEC:1333.2.1Resource methods MUST have at most one entity parameter.true
falsetechnologyactivefalse
JAXRS:SPEC:1433.3Resource methods MAY return void, Response, GenericEntity, or another Java type, these return types are mapped to a response entity body as follows: true
falsetechnologyactivetrue
JAXRS:SPEC:14.133.3void: Results in an empty entity body with a 204 status code.true
falsetechnologyactivetrue
JAXRS:SPEC:14.233.3Response: Results in an entity body mapped from the entity property of the Response with the status code specified by the status property of the Response.true
falsetechnologyactivetrue
JAXRS:SPEC:14.333.3Response: A null return value results in a 204 status code.true
falsetechnologyactivetrue
JAXRS:SPEC:14.433.3Response:If the status property of the Response is not set: a 200 status code is used for a non-null entity property and a 204 status code is used if the entity property is null.true
falsetechnologyactivetrue
JAXRS:SPEC:14.533.3GenericEntity: Results in an entity body mapped from the Entity property of the GenericEntity. If the return value is not null a 200 status code is usedtrue
falsetechnologyactivetrue
JAXRS:SPEC:14.633.3GenericEntity: a null return value results in a 204 status code.true
falsetechnologyactivetrue
JAXRS:SPEC:14.733.3Other: Results in an entity body mapped from the class of the returned instance. If the return value is not null a 200 status code is usedtrue
falsetechnologyactivetrue
JAXRS:SPEC:14.833.3Other: a null return value results in a 204 status code. true
falsetechnologyactivetrue
JAXRS:SPEC:1533.3The return type of a resource method and the type of the returned instance are used to determine the raw type and generic type supplied to the isWritable method of MessageBodyWriteras follows: true
falsetechnologyactivetrue
JAXRS:SPEC:15.133.3Return Typetrue
falsetechnologyactivetrue
JAXRS:SPEC:15.233.3Returned Instance true
falsetechnologyactivetrue
JAXRS:SPEC:15.333.3Raw Typetrue
falsetechnologyactivetrue
JAXRS:SPEC:15.433.3Generic Type true
falsetechnologyactivetrue
JAXRS:SPEC:1633.4A resource method, sub-resource method or sub-resource locator may throw any checked or unchecked exception. An implementation MUST catch all exceptions and process them as follows: true
falsetechnologyactivetrue
JAXRS:SPEC:16.133.4Instances of WebApplicationException MUST be mapped to a response as follows. If the response property of the exception does not contain an entity and an exception mapping provider (see section 4.4) is available for WebApplicationException an implementation MUST use the provider to create a new Response instance, otherwise the response property is used directly. The resulting Response instance is then processed according to section 3.3.3. true
falsetechnologyactivetrue
JAXRS:SPEC:16.233.4 If an exception mapping provider (see section 4.4) is available for the exception or one of its superclasses, an implementation MUST use the provider whose generic type is the nearest superclass of the exception to create a Response instance that is then processed according to section 3.3.3. If the exception mapping provider throws an exception while creating a Response then return a server error (status code 500) response to the client. true
falsetechnologyactivetrue
JAXRS:SPEC:16.333.4Unchecked exceptions and errors MUST be re-thrown and allowed to propagate to the underlying container. true
falsetechnologyremovedtrue
JAXRS:SPEC:16.433.4Checked exceptions and throwables that cannot be thrown directly MUST be wrapped in a container-specific exception that is then thrown and allowed to propagate to the underlying container. Servlet-based implementations MUST use ServletException as the wrapper. JAX-WS Provider-based implementations MUST use WebServiceException as the wrapper. true
falsetechnologyremovedfalse
JAXRS:SPEC:1733.5On receipt of a HEAD request an implementation MUST either: true
falsetechnologyactivetrue
JAXRS:SPEC:17.133.5Call a method annotated with a request method designator for HEADtrue
falsetechnologyactivetrue
JAXRS:SPEC:17.233.5or, if none present, Call a method annotated with a request method designator for GET and discard any returned entity.true
falsetechnologyactivetrue
JAXRS:SPEC:1833.5On receipt of an OPTIONS request an implementation MUST either: true
falsetechnologyactivetrue
JAXRS:SPEC:18.133.5Call a method annotated with a request method designator for OPTIONS or, if none present, true
falsetechnologyactivetrue
JAXRS:SPEC:18.233.5Generate an automatic response from the declared metadata of the matching class.true
falsetechnologyactivetrue
JAXRS:SPEC:1934Template parameters can optionally specify the regular expression used to match their values.false
falsetechnologyactivetrue
JAXRS:SPEC:2034.1The presence or absence of a request method designator (e.g. @GET) differentiates between the two: true
falsetechnologyactivetrue
JAXRS:SPEC:20.134.1Present Such methods, known as sub-resource methods, are treated like a normal resource method (see section 3.3) except the method is only invoked for request URIs that match a URI template created by concatenating the URI template of the resource class with the URI template of the method true
falsetechnologyactivetrue
JAXRS:SPEC:20.234.1Absent Such methods, known as sub-resource locators, are used to dynamically resolve the object that will handle the request. Any returned object is treated as a resource class instance and used to either handle the request or to further resolve the object that will handle the request, see 3.7 for further details. An implementation MUST dynamically determine the class of object returned rather than relying on the static sub-resource locator return type since the returned instance may be a subclass of the declared type with potentially different annotations, see section 3.6 for rules on annotation inheritance.true
falsetechnologyactivetrue
JAXRS:SPEC:20.334.1Sub-resource locators may have all the same parameters as a normal resource method (see section 3.3) except that they MUST NOT have an entity parameter.true
falsetechnologyactivetrue
JAXRS:SPEC:2135An implementation MUST NOT invoke a method whose effective value of @Produces does not match the request Accept header.true
falsetechnologyactivetrue
JAXRS:SPEC:2235An implementation MUST NOT invoke a method whose effective value of @Consumes does not match the request Content-Type header.true
falsetechnologyactivetrue
JAXRS:SPEC:2336Annotations on a super-class take precedence over those on an implemented interface.true
falsetechnologyactivetrue
JAXRS:SPEC:2436If a subclass or implementation method has any RESTful Web Services annotations then all of the annotations on the super class or interface method are ignored.true
falsetechnologyactivetrue
JAXRS:SPEC:2537Implementations are not required to use the algorithm as written but MUST produce results equivalent to those produced by the algorithm. true
falsetechnologyactivetrue
JAXRS:SPEC:25.137.2If E is empty then no matching resource can be found, the algorithm terminates and an implementation MUST generate a WebApplicationException with a not found response (HTTP 404 status) and no entity. The exception MUST be processed as described in section 3.3.4. true
falsetechnologyactivetrue
JAXRS:SPEC:25.237.2Sort E using the number of literal characters in each member as the primary key (descending order), the number of capturing groups as a secondary key (descending order) and the number of capturing groups with non-default regular expressions (i.e. not ‘([ˆ/]+?)’) as the tertiary key (descending order). true
falsetechnologyactivetrue
JAXRS:SPEC:25.337.2Sort E using the number of literal characters in each member as the primary key (descending order), the number of capturing groups as a secondary key (descending order), the number of capturing groups with non-default regular expressions (i.e. not ‘([ˆ/]+?)’) as the tertiary key (descending order), and the source of each member as quaternary key sorting those derived from Tmethod ahead of those derived from Tlocator. true
falsetechnologyactivetrue
JAXRS:SPEC:25.437.2The request method is supported. If no methods support the request method an implementation MUST generate a WebApplicationException with a method not allowed response (HTTP 405 status) and no entity. The exception MUST be processed as described in section 3.3.4. Note the additional support for HEAD and OPTIONS described in section 3.3.5. true
falsetechnologyactivetrue
JAXRS:SPEC:25.537.2The media type of the request entity body (if any) is a supported input data format (see section 3.5). If no methods support the media type of the request entity body an implementation MUST generate a WebApplicationException with an unsupported media type response (HTTP 415 status) and no entity. The exception MUST be processed as described in section 3.3.4. true
falsetechnologyactivetrue
JAXRS:SPEC:25.637.2At least one of the acceptable response entity body media types is a supported output data format (see section 3.5). If no methods support one of the acceptable response entity body media types an implementation MUST generate a WebApplicationException with a not acceptable response (HTTP 406 status) and no entity. The exception MUST be processed as described in section 3.3.4. true
falsetechnologyactivetrue
JAXRS:SPEC:25.737.2Let t be the request content type and CM a resource method’s @Consumes set of server media types, we use the media type max>={S(t,c) | (t, c) e {t} X CM} as primary keytrue
falsetechnologyactivetrue
JAXRS:SPEC:25.837.2Let A be the request accept header set of client media types and PM a resource method’s @Produces set of server media types, we use the media type max>={S(a, p) | (a, p) e A X PM} as secondary key.true
falsetechnologyactivetrue
JAXRS:SPEC:25.937.2n1/m1 > n2/m2 where the partial order > is defined as n/m > n/* > */*true
falsetechnologyactivetrue
JAXRS:SPEC:25.1037.2n2/m2 /> n1/m1 and v1 > v2true
falsetechnologyactivetrue
JAXRS:SPEC:25.1137.2n2/m2 /> n1/m1 and v1 = v2 and v1' > v2'true
falsetechnologyactivetrue
JAXRS:SPEC:25.1237.2n2/m2 /> n1/m1 and v1 = v2 and v1' = v2' and v1'' <= v2''true
falsetechnologyactivetrue
JAXRS:SPEC:2638The following algorithm is used to determine the response media type, Mselected, at run timetrue
falsetechnologyactivetrue
JAXRS:SPEC:26.138If the method returns an instance of Response whose metadata includes the response media type (Mspecified) then set Mselected = Mspecified, finishtrue
falsetechnologyactivetrue
JAXRS:SPEC:26.238If the method is annotated with @Produces, set P = V (method) where V (t) represents the values of @Produces on the specified target t.true
falsetechnologyactivetrue
JAXRS:SPEC:26.338Else if the class is annotated with @Produces, set P = V (class).true
falsetechnologyactivetrue
JAXRS:SPEC:26.438Else set P = V (writers) where ‘writers’ is the set of MessageBodyWriter that support the class of the returned entity objecttrue
falsetechnologyactivetrue
JAXRS:SPEC:26.538If P = , set P = ‘*/*’true
falsetechnologyactivefalse
JAXRS:SPEC:26.638If A = , set A = ‘*/*’true
falsetechnologyactivetrue
JAXRS:SPEC:26.738If M = ,then generate a WebApplicationException with a not acceptable response (HTTP 406 status) and no entity. The exception MUST be processed as described in Section 3.3.4. Finishtrue
falsetechnologyactivetrue
JAXRS:SPEC:26.838Sort M in descending order, with a primary key of specificity (n/m > n/* > */*), a secondary key of q-value and a tertiary key of qs-value.true
falsetechnologyactivetrue
JAXRS:SPEC:26.938If M contains ‘*/*’ or ‘application/*’, set Mselected = ‘application/octet-stream’, finish. true
falsetechnologyactivefalse
JAXRS:SPEC:26.1038Generate a WebApplicationException with a not acceptable response (HTTP 406 status) and no entity. The exception MUST be processed as described in section 3.3.4. Finish. true
falsetechnologyactivetrue
JAXRS:SPEC:2741.3Provider classes are instantiated by the RESTful Web Services runtime and MUST have a public constructor for which the RESTful Web Services runtime can provide all parameter values. Note that a zero argument constructor is permissible under this rule. true
falsetechnologyactivetrue
JAXRS:SPEC:2841.3If more than one public constructor can be used then an implementation MUST use the one with the most parameters. true
falsetechnologyactivetrue
JAXRS:SPEC:2941.3In the absence of a suitable entity provider, RESTful Web Services implementations are REQUIRED to use to the JavaBeans Activation Framework[11] to try to obtain a suitable data handler to perform the mapping instead. true
falsetechnologyremovedfalse
JAXRS:SPEC:3042.3The absence of these annotations is equivalent to their inclusion with media type (“*/*”), i.e. absence implies that any media type is supported. true
falsetechnologyactivetrue
JAXRS:SPEC:3142.3An implementation MUST NOT use an entity provider for a media type that is not supported by that provider. true
falsetechnologyactivetrue
JAXRS:SPEC:3242.3When choosing an entity provider an implementation sorts the available providers according to the media types they declare support for. Sorting of media types follows the general rule: x/y < x/* < */*, i.e. a provider that explicitly lists a media types is sorted before a provider that lists */*. true
falsetechnologyactivetrue
JAXRS:SPEC:3342.4An implementation MUST include pre-packaged MessageBodyReader and MessageBodyWriter implementations for the following Java and media type combinations: true
falsetechnologyactivetrue
JAXRS:SPEC:33.142.4byte[] All media types (*/*).true
falsetechnologyactivetrue
JAXRS:SPEC:33.242.4java.lang.String All media types (*/*).true
falsetechnologyactivetrue
JAXRS:SPEC:33.342.4java.io.InputStream All media types (*/*).true
falsetechnologyactivetrue
JAXRS:SPEC:33.442.4java.io.Reader All media types (*/*).true
falsetechnologyactivetrue
JAXRS:SPEC:33.542.4java.io.File All media types (*/*).true
falsetechnologyactivetrue
JAXRS:SPEC:33.642.4jakarta.activation.DataSource All media types (*/*).true
falsetechnologyactivetrue
JAXRS:SPEC:33.742.4javax.xml.transform.Source XML types (text/xml, application/xml and application/*+xml).true
falsetechnologyactivetrue
JAXRS:SPEC:33.842.4jakarta.xml.bind.JAXBElement and application-supplied JAXB classes XML media types (text/xml, application/xml and application/*+xml).true
falsetechnologyactivetrue
JAXRS:SPEC:33.942.4MultivaluedMap<String,String> Form content (application/x-www-form-urlencoded).true
falsetechnologyactivetrue
JAXRS:SPEC:33.1042.4StreamingOutput All media types (*/*), MessageBodyWriter only.true
falsetechnologyactivetrue
JAXRS:SPEC:33.1142.4java.lang.Boolean. Only for text/plain. Corresponding primitive types supported via boxing/unboxing conversion.true
falsetechnologyactivetrue
JAXRS:SPEC:33.1242.4java.lang.Character. Only for text/plain. Corresponding primitive types supported via boxing/unboxing conversion.true
falsetechnologyactivetrue
JAXRS:SPEC:33.1342.4java.lang.Number. Only for text/plain. Corresponding primitive types supported via boxing/unboxing conversion.true
falsetechnologyactivetrue
JAXRS:SPEC:3442.4The implementation-supplied entity provider(s) for jakarta.xml.bind.JAXBElement and application-supplied JAXB classes MUST use JAXBContext instances provided by application-supplied context resolvers, see section 4.3. If an application does not supply a JAXBContext for a particular type, the implementation-supplied entity provider MUST use its own default context instead.true
falsetechnologyactivetrue
JAXRS:SPEC:3542.4An implementation MUST support application-provided entity providers and MUST use those in preference to its own pre-packaged providers when either could handle the same request. More precisely, step 4 in Section 4.2.1 and step 5 in Section 4.2.2 MUST prefer application-provided over pre-packaged entity providers.true
falsetechnologyactivetrue
JAXRS:SPEC:3642.5MessageBodyReader providers always operate on the decoded HTTP entity body rather than directly on the HTTP message body.true
falsetechnologyactivefalse
JAXRS:SPEC:3742.6Content encoding is the responsibility of the application. Application-supplied entity providers MAY perform such encoding and manipulate the HTTP headers accordingly.false
falsetechnologyactivetrue
JAXRS:SPEC:3843.1When choosing a context provider an implementation sorts the available providers according to the media types they declare support for. Sorting of media types follows the general rule: x/y < x/* < */*, i.e. a provider that explicitly lists a media type is sorted before a provider that lists */*.true
falsetechnologyactivetrue
JAXRS:SPEC:3944When choosing an exception mapping provider to map an exception, an implementation MUST use the provider whose generic type is the nearest superclass of the exception.true
falsetechnologyactivetrue
JAXRS:SPEC:40101When injecting an instance of one of the types listed in section 9.2, the instance supplied MUST be capable of selecting the correct context for a particular request.true
falsetechnologyactivetrue
JAXRS:SPEC:41101The @Context annotation can be used to indicate a dependency on a Servlet-defined resource. true
falseplatformactivetrue
JAXRS:SPEC:42111A Servlet-based implementation MUST support injection of the following Servlet-defined types: ServletConfig, ServletContext, HttpServletRequest and HttpServletResponse.true
falseplatformactivetrue
JAXRS:SPEC:43111An injected HttpServletRequest allows a resource method to stream the contents of a request entity. If the resource method has a parameter whose value is derived from the request entity then the stream will have already been consumed and an attempt to access it MAY result in an exception. .true
falseplatformactivetrue
JAXRS:SPEC:44111An injected HttpServletResponse allows a resource method to commit the HTTP response prior to returning. An implementation MUST check the committed status and only process the return value if the response is not yet committed.true
falseplatformactivetrue
JAXRS:SPEC:45111Servlet filters may trigger consumption of a request body by accessing request parameters. true
falseplatformactivetrue
JAXRS:SPEC:46111In a servlet container the @FormParam annotation and the standard entity provider for application/x-www-form--urlencoded MUST obtain their values from the servlet request parameters if the request body has already been consumed. true
falseplatformactivetrue
JAXRS:SPEC:47111Servlet APIs do not differentiate between parameters in the URI and body of a request so URI-based query parameters may be included in the entity parameter. true
falseplatformactivetrue
JAXRS:SPEC:48112.1In a product that also supports the Servlet specification, implementations MUST support RESTful Web Services applications that are packaged as a web application, true
falseplatformactivetrue
JAXRS:SPEC:49112.2In a product that also supports Managed Beans, implementations MUST support use of Managed Beans as root resource classes, providers and Application subclasses.true
falseplatformactivetrue
JAXRS:SPEC:50112.3In a product that also supports JSR 299, implementations MUST similarly support use of JSR299-style managed beans. Providers and Application subclasses MUST be singletons or use application scope.true
falseplatformactivetrue
JAXRS:SPEC:51112.4In a product that also supports EJB, an implementation MUST support use of stateless and singleton session beans as root resource classes, providers and Application subclasses. RESTful Web Services annotations MAY be applied to a bean’s local interface or directly to a no-interface bean. true
falseplatformactivetrue
JAXRS:SPEC:52112.4If an ExceptionMapper for a EJBException or subclass is not included with an application then exceptions thrown by an EJB resource class or provider method MUST be treated as EJB application exceptions: the embedded cause of the EJBException MUST be unwrapped and processed. true
falseplatformactivetrue
JAXRS:SPEC:53112.8The following additional requirements apply when using Managed Beans, JSR299-style Managed Beans or EJBs as resource classes, providers or Application subclasses: true
falseplatformactivetrue
JAXRS:SPEC:53.1112.8Field and property injection of RESTful Web Services resources MUST be performed prior to the container invoking any @PostConstruct annotated method. true
falseplatformactivetrue
JAXRS:SPEC:53.2112.8Support for constructor injection of RESTful Web Services resources is OPTIONAL. Portable applications MUST instead use fields or bean properties in conjunction with a @PostConstruct annotated method. Implementations SHOULD warn users about use of non-portable constructor injection. false
falseplatformactivetrue
JAXRS:SPEC:53.3112.8Implementations MUST NOT require use of @Inject or @Resource to trigger injection of RESTful Web Services annotated fields or properties. Implementations MAY support such usage but SHOULD warn users about non-portability. true
falseplatformactivetrue
JAXRS:SPEC:54113Other container technologies MAY specify their own set of injectable resources but MUST, at a minimum, support access to the types of context listed in section 5.2. true
falseplatformactiveno
JAXRS:SPEC:5521The resources and providers that make up a RESTful Web Services application are configured via an application-supplied subclass of Application. An implementation MAY provide alternate mechanisms for locating resource classes and providers (e.g. runtime class scanning) but use of Application is the only portable means of configuration. true
falsetechnologyactivefalse
JAXRS:SPEC:5623.2(deploy with Servlet container)If no Application subclass is present the added servlet MUST be named: jakarta.ws.rs.core.Application, and all root resource classes and providers packaged in the web application MUST be included in the published RESTful Web Services application. The application MUST be packaged with a web.xml that specifies a servlet mapping for the added servlet.true
falseplatformactivetrue
JAXRS:SPEC:5723.2(deploy with Servlet container)If an Application subclass is present and there is already a servlet defined that has a servlet initialization parameter named: jakarta.ws.rs.Application, whose value is the fully qualified name of the Application subclass then no new servlet should be added by the RESTful Web Services implementation’s ContainerInitializer since the application is already being handled by an existing servlet.true
falseplatformactivetrue
JAXRS:SPEC:5823.2(deploy with Servlet container)If an Application subclass is present that is not being handled by an existing servlet then the servlet added by the ContainerInitializer MUST be named with the fully qualified name of the Application subclass. If the Application subclass is annotated with @ApplicationPath and no servlet-mapping exists for the added servlet then a new servlet mapping is added with the value of the @ApplicationPath annotation with ”/*” appended otherwise the existing mapping is used. If the Application subclass is not annotated with @ApplicationPath then the application MUST be packaged with a web.xml that specifies a servlet mapping for the added servlet. It is an error for more than one application to be deployed at the same effective servlet mappingtrue
falseplatformactivetrue
JAXRS:SPEC:5923.2(deploy with Servlet container)In either of the latter two cases, if both Application.getClasses and Application.getSingletons return an empty list then all root resource classes and providers packaged in the web application MUST be included in the published RESTful Web Services application. If either getClasses or getSingletons return a non-empty list then only those classes or singletons returned MUST be included in the published RESTful Web Services application. true
falseplatformactivetrue
JAXRS:SPEC:6023.2(deploy with Servlet container)If not using the Servlet 3 framework pluggability mechanism (e.g. in a pre-Servet 3.0 container), the servlet-class or filter-class element of the web.xml descriptor SHOULD name the RESTful Web Services implementation-supplied servlet or filter class respectively. The Application subclass SHOULD be identified using an init-param with a param-name of jakarta.ws.rs.Application.true
falseplatformactivetrue
JAXRS:SPEC:6137.1The normalized request URI MUST be reflected in the URIs obtained from an injected UriInfo.true
falsetechnologyactivetrue
JAXRS:SPEC:6242.1The following describes the logical1 steps taken by a RESTful Web Services implementation when mapping a request entity body to a Java method parametertrue
falsetechnologyactivetrue
JAXRS:SPEC:62.142.1Obtain the media type of the request. If the request does not contain a Content-Type header then use application/octet-streamtrue
falsetechnologyactivetrue
JAXRS:SPEC:62.242.1Select the set of MessageBodyReader classes that support the media type of the request, see Section 4.2.3.true
falsetechnologyactivetrue
JAXRS:SPEC:62.342.1Iterate through the selected MessageBodyReader classes and, utilizing the isReadable method of each, choose a MessageBodyReader provider that supports the desired Java typetrue
falsetechnologyactivetrue
JAXRS:SPEC:62.442.1If step 4 locates a suitable MessageBodyReader then use its readFrom method to map the entity body to the desired Java typetrue
falsetechnologyactivetrue
JAXRS:SPEC:62.542.1Else generate a WebApplicationException that contains an unsupported media type response (HTTP 415 status) and no entity. The exception MUST be processed as described in Section 3.3.4.true
falsetechnologyactivetrue
JAXRS:SPEC:6342.2The following describes the logical steps taken by a RESTful Web Services implementation when mapping a return value to a response entity bodytrue
falsetechnologyactivetrue
JAXRS:SPEC:63.142.2Obtain the object that will be mapped to the response entity body. For a return type of Response or subclasses the object is the value of the entity property, for other return types it is the returned object.true
falsetechnologyactivetrue
JAXRS:SPEC:63.242.2Select the set of MessageBodyWriter providers that support (see Section 4.2.3) the object and media type of the response entity body.true
falsetechnologyactivetrue
JAXRS:SPEC:63.342.2Sort the selected MessageBodyWriter providers with a primary key of generic type where providers whose generic type is the nearest superclass of the object class are sorted first and a secondary key of media type (see Section 4.2.3).true
falsetechnologyactivetrue
JAXRS:SPEC:63.442.2Iterate through the sorted MessageBodyWriter providers and, utilizing the isWriteable method of each, choose an MessageBodyWriter that supports the object that will be mapped to the entity body.true
falsetechnologyactivetrue
JAXRS:SPEC:63.542.2If step 5 locates a suitable MessageBodyWriter then use its writeTo method to map the object to the entity bodytrue
falsetechnologyactivetrue
JAXRS:SPEC:63.642.2Else generate a WebApplicationException with an internal server error response (HTTP 500 status) and no entity. The exception MUST be processed as described in Section 3.3.4true
falsetechnologyactivetrue
JAXRS:SPEC:6451Client instances can be configured by calling the configuration method; the object returned, of type Configuration provides access to providers, properties and featurestrue
falsetechnologyremovedtrue
JAXRS:SPEC:6552Conceptually, the steps required to submit a request are the following: (i) obtain an instance of Client (ii) create a WebTarget (iii) create a request from the WebTarget and (iv) submit a request or get a prepared Invocation for later submissiontrue
falsetechnologyactivetrue
JAXRS:SPEC:6653WebTarget instances are immutable with respect to their URI (or URI template): methods for specifying additional path segments and parameters return a new instance of WebTarget.true
falsetechnologyactivetrue
JAXRS:SPEC:6753However, WebTarget instances are mutable with respect to their configuration. Thus, configuring a WebTarget does not create new instancestrue
falsetechnologyactivetrue
JAXRS:SPEC:6853Note that changes to hello’s configuration do not affect base, i.e. inheritance performs a deep copy of the configuration.true
falsetechnologyactivetrue
JAXRS:SPEC:6954RESTful Web Services implementations are REQUIRED to use entity providerstrue
falsetechnologyactivetrue
JAXRS:SPEC:7054See Section 4.2.4 for a list of entity providers that MUST be supported by all RESTful Web Services implementationstrue
falsetechnologyactivetrue
JAXRS:SPEC:7155The mapping calls Invocation.invoke() to execute the invocation synchronously; asynchronous execution is also supported by calling Invocation.submit().true
falsetechnologyactivetrue
JAXRS:SPEC:7256The following Client API types are configurable: Client, Invocation, Invocation.Builder and WebTarget. Configuration methods are inherited from the Configurable interface implemented by all these classes.true
falsetechnologyactivetrue
JAXRS:SPEC:7356This interface supports configuration of: Features, Properties, Providerstrue
falsetechnologyactivetrue
JAXRS:SPEC:7456However, any additional changes to the instance of WebTarget will not impact the Client’s configuration and vice versa.true
falsetechnologyactivetrue
JAXRS:SPEC:7542.4When reading zero-length request entities all pre-packaged MessageBodyReader implementations, except the JAXB-related one and those for the (boxed) primitive types above, MUST create a corresponding Java object that represents zero-length data; they MUST NOT return null.true
falsetechnologyactivetrue
JAXRS:SPEC:7642.4The pre-packaged JAXB and the prepackaged primitive type MessageBodyReader’s MUST throw a BadRequestException (400 status) for zero-length request entities.true
falsetechnologyactivetrue
JAXRS:SPEC:7731.2A public constructor MAY include parameters annotated with one of the following:true
falsetechnologyactivetrue
JAXRS:SPEC:77.131.2@Contexttrue
falsetechnologyactivetrue
JAXRS:SPEC:77.231.2@HeaderParamtrue
falsetechnologyactivetrue
JAXRS:SPEC:77.331.2@CookieParamtrue
falsetechnologyactivetrue
JAXRS:SPEC:77.431.2@MatrixParamtrue
falsetechnologyactivetrue
JAXRS:SPEC:77.531.2@QueryParamtrue
falsetechnologyactivetrue
JAXRS:SPEC:77.631.2@PathParamtrue
falsetechnologyactivetrue
JAXRS:SPEC:7835When accepting multiple media types, clients may indicate preferences by using a relative quality factor known as the q parameter. The value of the q parameter, or q-value, is used to sort the set of acceptedtrue
falsetechnologyactivetrue
JAXRS:SPEC:7935A server can also indicate media type preference using the qs parameter; server preference is only examined when multiple media types are accepted by a client with the same q-value.true
falsetechnologyactivetrue
JAXRS:SPEC:8043Context providers MAY return null from the getContext method if they do not wish to provide their context for a particular Java type.true
falsetechnologyactivetrue
JAXRS:SPEC:8143.1Context provider implementations MAY restrict the media types they support using the @Produces annotation. The absence of this annotation is equivalent to its inclusion with media type (“*/*”), i.e. absence implies that any media type is supported.true
falsetechnologyactivetrue
JAXRS:SPEC:8244When a resource class or provider method throws an exception for which there is an exception mapping provider, the matching provider is used to obtain a Response instance. The resulting Response is processed as if a web resource method had returned the Response, see Section 3.3.3. In particular, a mapped Response MUST be processed using the ContainerResponse filter chain defined in Chapter 6.true
falsetechnologyactivetrue
JAXRS:SPEC:8344To avoid a potentially infinite loop, a single exception mapper must be used during the processing of a request and its corresponding response. RESTful Web Services implementations MUST NOT attempt to map exceptions thrown while processing a response previously mapped from an exception. Instead, this exception MUST be processed as described in steps 3 and 4 in Section 3.3.4.true
falsetechnologyactivetrue
JAXRS:SPEC:8461RESTful Web Services implementations are REQUIRED to call registered interceptors when mapping representations to Java types and vice versa.true
falsetechnologyactivetrue
JAXRS:SPEC:8562Request filters implementing ClientRequestFilter or ContainerRequestFilter can stop the execution of their corresponding chains by calling abortWith(Response) in their corresponding context object. If this method is invoked, RESTful Web Services implementations are REQUIRED to abort execution of the chain and treat the response object as if produced by calling the resource method (Server API) or executing the HTTP invocation (Client API).true
falsetechnologyactivetrue
JAXRS:SPEC:8663RESTful Web Services implementations MUST use the last parameter values set in the context object when calling the wrapped methods MessageBodyReader.readFrom and MessageBodyWrite.writeTo.true
falsetechnologyactivetrue
JAXRS:SPEC:8765.2Binding annotations that decorate resource classes apply to all the resource methods defined in them. A filter or interceptor class can be decorated with multiple binding annotations.true
falsetechnologyactivetrue
JAXRS:SPEC:8865.2Similarly, a resource method can be decorated with multiple binding annotations. Each binding annotation instance in a resource method denotes a set of filters and interceptors whose class definitions are decorated with that annotation (possibly among others). The final set of (static) filters and interceptors is the union of all these setstrue
falsetechnologyactivetrue
JAXRS:SPEC:8965.2returning filters or interceptors from the methods getClasses or getSingletons in an application subclass will bind them globally only if they are not decorated with a name binding annotation. If they are decorated with at least one name binding annotation, the application subclass must be annotated as shown above in order for those filters or interceptors to be globally boundtrue
falsetechnologyactivetrue
JAXRS:SPEC:9067.1When a filter or interceptor method throws an exception, the RESTful Web Services runtime will attempt to map the exception as described in Section 4.5. As explained in Section 4.4, an application can supply exception mapping providers to customize this mappingtrue
falsetechnologyactivetrue
JAXRS:SPEC:9167.1At most one exception mapper will be used in a single request processing cycle to avoid potentially infinite loops. A response mapped from an exception MUST be filtered as followstrue
falsetechnologyactivetrue
JAXRS:SPEC:91.167.1If a web resource had been matched before the exception was thrown, then all the filters in the ContainerResponse chain for that resource MUST be invoked;true
falsetechnologyactivetrue
JAXRS:SPEC:91.267.1Otherwise, only globally bound filters in the ContainerResponse chain MUST be invokedtrue
falsetechnologyactivetrue
JAXRS:SPEC:9266Execution chains for extension points ContainerRequest, PreMatchContainerRequest, ClientRequest, ReadFrom and WriteTo are sorted in ascending order; the lower the number the higher the priority. Execution chains for extension points ContainerResponse and ClientResponse are sorted in descending order; the higher the number the higher the priority.true
falsetechnologyactivetrue
JAXRS:SPEC:93102This section describes the types of context available totrue
falsetechnologyactivetrue
JAXRS:SPEC:93.1102Application subclassestrue
falsetechnologyactivetrue
JAXRS:SPEC:93.2102resource classestrue
falsetechnologyactivetrue
JAXRS:SPEC:93.3102providerstrue
falsetechnologyactivetrue
JAXRS:SPEC:94102.1The instance of the application-supplied Application subclass can be injected into a class field or method parameter using the @Context annotation.true
falsetechnologyactivetrue
JAXRS:SPEC:95102.2An instance of UriInfo can be injected into a class field or method parameter using the @Context annotation.true
falsetechnologyactivetrue
JAXRS:SPEC:96102.3An instance of HttpHeaders can be injected into a class field or method parameter using the @Context annotation.true
falsetechnologyactivetrue
JAXRS:SPEC:97102.4An instance of Request can be injected into a class field or method parameter using the @Context annotation.true
falsetechnologyactivetrue
JAXRS:SPEC:98102.5An instance of SecurityContext can be injected into a class field or method parameter using the @Context annotation.true
falsetechnologyactivetrue
JAXRS:SPEC:99102.6An instance of Providers can be injected into a class field or method parameter using the @Context annotation.true
falsetechnologyactivetrue
JAXRS:SPEC:100102.7It (ResourceContext) can be injected to help with creation and initialization, or just initialization, of instances created by an application.true
falsetechnologyactivetrue
JAXRS:SPEC:10175RESTful Web Services implementations MUST follow the constraint annotation rules defined in Bean Validation 1.1. JSRtrue
falsetechnologyactivetrue
JAXRS:SPEC:10276RESTful Web Services implementations MUST provide a default exception mapper (see Section 4.4) for jakarta.validation.ValidationException according to the following rulestrue
falsetechnologyactivetrue
JAXRS:SPEC:102.176If the exception is of type jakarta.validation.ValidationException or any of its subclasses excluding jakarta.validation.ConstraintViolationException, then it is mapped to a response with status code 500 (Internal Server Error).true
falsetechnologyactivetrue
JAXRS:SPEC:102.276If the exception is an instance of jakarta.validation.ConstraintViolationException, then: (a) If the exception was thrown while validating a method return type, then it is mapped to a response with status code 500 (Internal Server Error) 1true
falsetechnologyactivetrue
JAXRS:SPEC:102.376If the exception is an instance of jakarta.validation.ConstraintViolationException, then: (b) Otherwise, it is mapped to a response with status code 400 (Bad Request).true
falsetechnologyactivetrue
JAXRS:SPEC:10382.1RESTful Web Services implementations are REQUIRED to generate a ServiceUnavailableException, a subclass of WebApplicationException with its status set to 503, if the timeout value is reached and no timeout handler is registered.true
falsetechnologyactivetrue
JAXRS:SPEC:10482.1The exception MUST be processed as described in section 3.3.4.true
falsetechnologyactivetrue
JAXRS:SPEC:10582.1If a registered timeout handler resets the timeout value or resumes the connection and returns a response, RESTful Web Services implementations MUST NOT generate an exception.true
falsetechnologyactivetrue
JAXRS:SPEC:10683When an EJB method is annotated with @Asynchronous, the EJB container automatically allocates the necessary resources for its execution.true
falsetechnologyactivetrue
JAXRS:SPEC:107112.6In a product that supports the Java API for JSON Processing (JSON-P) [15], implementations MUST support entity providers for the following types: JsonStructure, JsonObject and JsonArray. Therefore, the standard set of entity providers from Section 4.2.4 is extended to support these types in combinations with the application/json media type.true
falsetechnologyactivetrue
JAXRS:SPEC:10834The value of the annotation is automatically encodedtrue
falsetechnologyactivetrue
JAXRS:SPEC:10937.3Converting URI Templates to Regular Expressionstrue
falsetechnologyactivetrue
JAXRS:SPEC:11041A RESTful Web Services implementation that supports automatic discovery of classes MUST process only those classes that are annotated with @Provider.true
falsetechnologyactivetrue
JAXRS:SPEC:11145.1When a provider method throws an exception, the RESTful Web Services server runtime will attempt to map the exception to a suitable HTTP response in the same way as described for methods and locators in Section 3.3.4.true
falsetechnologyactivetrue
JAXRS:SPEC:11245.1If the exception is thrown while generating a response, RESTful Web Services implementations are required to map the exception only when the response has not been committed yet.true
falsetechnologyactivetrue
JAXRS:SPEC:11345.2When a provider method throws an exception, the RESTful Web Services client runtime will map it to an instance of ProcessingException if thrown while processing a request, and to a ResponseProcessingException if thrown while processing a response.true
falsetechnologyactivetrue
JAXRS:SPEC:11456.1filters and interceptors are defined as RESTful Web Services providers. Therefore, they can be registered in any of the configurable typestrue
falsetechnologyactivetrue
JAXRS:SPEC:11561Filters and entity interceptors are providers and, as such, may be annotated with @Provider for automatic discoverytrue
falsetechnologyactivetrue
JAXRS:SPEC:11666Execution chains for extension points ContainerRequest, PreMatchContainerRequest, ClientRequest, ReadFrom and WriteTo are sorted in ascending order; the lower the number the higher the priority. Execution chains for extension poits ContainerResponse and ClientResponse are sorted in descending order; the higher the number the higher the priority.true
falsetechnologyactivetrue
JAXRS:SPEC:11767.2When a filter or interceptor method throws an exception, the client runtime will process the exception as described in Section 4.5.2true
falsetechnologyactivetrue
JAXRS:SPEC:11871These constraint annotations are not restricted to method parameters, they can be used in any location in which the RESTful Web Services binding annotations are allowed with the exception of constructors and property setters. Constraint annotations are also allowed on resource classes.true
falsetechnologyactivetrue
JAXRS:SPEC:11972Constraint annotations must also define a groups element to indicate which processing groups they are associated with. If no groups are specified (as in the example above) the Default group is assumed. For simplicity, RESTful Web Services implementations are NOT REQUIRED to support processing groups other than Default.true
falsetechnologyactivetrue
JAXRS:SPEC:12073Response entity bodies returned from resource methods can be validated in a similar manner by annotating the resource method itself.true
falsetechnologyactivetrue
JAXRS:SPEC:12174According to BeanValidation 1.1 JSR, validation is enabled by default only for the so called constrained methods. Getter methods as defined by the Java Beans specification are not constrained methods, so they will not be validated by default.true
falsetechnologyactivetrue
JAXRS:SPEC:122102.8Both the client and the server runtime configurations are available for injection via @Context. These configurations are available for injection in providers (client or server) and resource classes (server only) true
falsetechnologyactivetrue
JAXRS:SPEC:123112.1Injection of Servlet-defined types is possible using the @Context annotation. Additionally, web application’s <context-param> and servlet’s <init-param> can be used to define application properties passed to server-side features or injected into server-side RESTful Web Services components. See Javadoc for Application.getProperties for more information.true
falsetechnologyactivetrue
JAXRS:SPEC:12433A request method designator is a runtime annotation that is annotated with the @HttpMethod annotation. RESTful Web Services defines a set of request method designators for the common HTTP methods: @GET, @POST, @PUT, @DELETE, @PATCH, @HEAD and @OPTIONS.true
falsetechnologyactivetrue
JAXRS:SPEC:12534.1A set of sub-resource methods annotated with the same URI template value are functionally equivalent to a similarly annotated sub-resource locator that returns an instance of a resource class with the same set of resource methods.true
falsetechnologyactivetrue
JAXRS:SPEC:12641.4Therefore, an application-supplied provider MUST always be preferred over a pre-packaged one if a single one is required.true
falsetechnologyactivetrue
JAXRS:SPEC:12741.4Application-supplied providers may be annotated with @Priority. If two or more providers are candidates for a certain task, the one with the highest priority is chosentrue
falsetechnologyactivetrue
JAXRS:SPEC:12882.2An alternative approach to the injection of AsyncResponse is for a resource method to return an instance of CompletionStage as an indication to the underlying RESTful Web Services implementation that asynchronous processing is enabled.true
falsetechnologyactivetrue
JAXRS:SPEC:129112.6In a product that supports the Java API for JSON Processing (JSON-P) [18], implementations MUST support entity providers for JsonValue and all of its sub-types: JsonString and JsonNumber.true
falsetechnologyactivetrue
JAXRS:SPEC:130112.7In a product that supports the Java API for JSON Binding (JSON-B) [19], implementations MUST support entity providers for all Java types supported by JSON-B in combination with the application/json media type. Note that if JSON-B and JSON-P are both supported in the same environment, entity providers for JSON-B take precedence over those for JSON-P for all types except JsonValue and its sub-types.true
falsetechnologyactivetrue
JAXRS:SPEC:13123.1There are two alternative ways of publishing on Java SE: Creating SE endpoints directly or using the SE bootstrap API. Any compliant implementation that supports either of these alternatives on Java SE MUST support both. true
falsetechnologyactivefalse
JAXRS:SPEC:13223.1In a Java SE environment a configured instance of an endpoint class can be obtained using the createEndpoint method of RuntimeDelegate. The application supplies an instance of Application and the type of endpoint required. An implementation MAY support zero or more endpoint types of any desired type. An implementation that supports publication via JAX-WS MUST support createEndpoint with an endpoint type of jakarta.xml.ws.Provider. JAX-WS describes how a Provider based endpoint can be published in an SE environment.true
falsetechnologyactivefalse
JAXRS:SPEC:13323.1In a Java SE environment an application can be published using an embedded HTTP server bootstrapped by the implementation. An application invokes SeBootstrap.start(app, config) with an implementation of Application and a configuration built by calling build() on a configuration builder. The builder is created by SeBootstrap.Configuration.builder() and assembles all information needed to configure the embedded HTTP server using properties. A compliant implementation MUST support all properties explicitly defined by SeBootstrap.Configuration, but MAY support additional properties using a product-specific namespace prefix.The namespace prefix jakarta is reserved and MUST NOT be extended by vendors, but only by future revisions of the Jakarta RESTful Web Services API, Javadoc and / or specification. true
falsetechnologyactivefalse
JAXRS:SPEC:13433.2For resource methods that consume multipart/form-data media types, the @FormParam annotation may be used on jakarta.ws.rs.core.EntityPart parameters.true
falsetechnologyactivefalse
JAXRS:SPEC:13535.2The multipart/form-data media type enables requests to send multiple entities (parts) as a single entity. Each part contains its own set of headers, media type and content. There are a few different ways to consume these requests in a resource method. First, a resource method may contain an entity parameter of type, List. Another approach is to use @FormParam parameters where the value in the annotation corresponds to the name of the part. The parameter type may be a jakarta.ws.rs.core.EntityPart, a java.io.InputStream, or a String. The only way to access the headers for a particular part is to use the EntityPart type. The InputStream and String types will only provide the content of the part. Note that parts of a multipart entity can be quite large, so care should be taken when using String parameter types as that will load the entire content of the part into the Java heap. When converting the part’s content, the implementation MUST use the encoding charset specified in the part’s Content-Type header, or UTF-8 if the charset is not specified in the header.true
falsetechnologyactivefalse
JAXRS:SPEC:13641.2On runtime initialization, an implementation MUST discover and register certain service providers in jakarta.ws.rs.core.Configuration runtime configurations, if and only if service loading is enabled. Service loading is enabled, except when there is an Application subclass whose getProperties method returns a map which contains the key jakarta.ws.rs.loadServices with a value of Boolean.FALSE.true
falsetechnologyactivetrue
JAXRS:SPEC:13741.2For each service X, where X is jakarta.ws.rs.core.Feature or jakarta.ws.rs.container.DynamicFeature, the set of providers to be registered MUST be determined as follows: • first, register all providers discovered with ServiceLoader.load(X.class) •additionally, register all providers discovered with ServiceLoader.load(X.class, X.class.getClassLoader()) true
falsetechnologyactivetrue
JAXRS:SPEC:13844 A JAX-RS implementation MUST include a default exception mapping provider that implements ExceptionMapper and which SHOULD set the response status to 500. When the default exception mapping provider handles a WebApplicationException, it MUST return the embedded Response, and it MUST respect the status code in the Response. Any registered CompletionCallback MUST be invoked with an unmapped exception before the default exception mapping provider maps the unmapped exception to a Response.true
falsetechnologyactivetrue