This class provides contextual information such as context and application
paths as well as access to the JAX-RS application configuration object.
In addition, it provides access to the security-related beans javax.mvc.security.Csrf and javax.mvc.security.Encoders.
Implementations of this class are injectable, must be
javax.enterprise.context.RequestScoped and accessible from EL using
the name mvc. For example, the CSRF token name and value can be
accessed in EL using the expressions mvc.csrf.name and mvc.csrf.token, respectively.
javax.ws.rs.core.Configuration
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: the application's base path.Get the application's base path which is defined as the concatenation of context and application paths. |
| public Configuration | |
| public Csrf | |
| public Encoders | |
| public Locale | |
| public URI | |
| public URI | |
| public UriBuilder | Returns: a reference to aUriBuilder.for the controller method. identifier)Returns a |
| getBasePath | back to summary |
|---|---|
| public String getBasePath() Get the application's base path which is defined as the concatenation of context and application paths. It follows that the value returned by this method always starts with a slash but never ends with one.
| |
| getConfig | back to summary |
|---|---|
| public Configuration getConfig() Get the JAX-RS application configuration object. All application-defined properties are accessible via this object.
| |
| getCsrf | back to summary |
|---|---|
| public Csrf getCsrf() Get the CSRF object.
| |
| getEncoders | back to summary |
|---|---|
| public Encoders getEncoders() Get the built-in encoders.
| |
| getLocale | back to summary |
|---|---|
| public Locale getLocale() Returns the locale of the current request.
| |
| uri | back to summary |
|---|---|
| public URI uri(String identifier) Creates an URI to be matched by a controller method. This is aimed primarily
for use in view rendering technologies to avoid duplicating the values of the
The controller method can either be identified by the simple name of the controller class
and the method name separated by '#' (MyController#myMethod) or by the value
of the The created URI includes context- and application path. This method assumes that there is no parameter in the URI-template. For example in JSP:
| |
| uri | back to summary |
|---|---|
| public URI uri(String identifier, Map<String, Object> params) Creates an URI to be matched by a controller method. This is aimed primarily
for use in view rendering technologies to avoid duplicating the values of the
The controller method can either be identified by the simple name of the controller class
and the method name separated by '#' (MyController#myMethod) or by the value
of the The created URI includes context- and application path. Any For example in JSP:
| |
| uriBuilder | back to summary |
|---|---|
| public UriBuilder uriBuilder(String identifier) Returns a The controller method can either be identified by the simple name of the controller class
and the method name separated by '#' (MyController#myMethod) or by the value
of the
| |