Package org.glassfish.jersey.server.mvc
Annotation Type ErrorTemplate
-
@Retention(RUNTIME) @Target({TYPE,METHOD}) @Documented public @interface ErrorTemplate
Used to annotate JAX-RS resources and resource methods to provide reference to an error template if an exception has been raised during processing a request (resource method invocation). The processing of this annotation is similar to the processing ofTemplate
annotation with the difference that the thrown exception (or an object derived from the exception) is used as a model for the defined template. By default everyexception
is mapped to a viewable and passed to the MVC runtime for further processing. Note: TheErrorTemplate
annotation can be used even in case when neitherviewable
is used as return value of a resource method norTemplate
annotation is used to annotate the resource method or resource class.- Since:
- 2.3
- Author:
- Michal Gajdos
- See Also:
Template
,AbstractErrorTemplateMapper
-
-
Element Detail
-
name
String name
The template name that should be used to display an error raised during processing a request. The template name may be declared as absolute template name if the name begins with a '/', otherwise the template name is recognized to be relative.- Default:
- ""
-
-