The designation is known as URI path templates and is described in the documentation .
You define a new template variable by declaring it in brackets {} . The JX-RS environment will bind the corresponding path segment from the requested URI to the declared @PathParam handler method parameter.
From the documentation
URI path templates are URIs with variables embedded in the URI syntax. These variables are replaced at run time to allow the resource to respond to the request based on the replaced URI. Variables are indicated by braces ( { and } ) . For example, look at the after @Path annotations:
@Path("/users/{username}")
In this example, the user is prompted to enter his or her name, and then the JAX-RS web service configured to respond to requests for this URI template response. For example, if the user enters the username "Galileo", the web service responds to the following URL:
http:
To get the username value, the @PathParam annotation can be used for the parameter of the request method method , as shown in the following code example:
@Path("/users/{username}") public class UserResource { @GET @Produces("text/xml") public String getUser(@PathParam("username") String userName) { ... } }
The documentation further indicates the syntax to indicate
By default, the URI variable must match the regular expression "[^ /] +?" . This variable can be configured by specifying another regular expression after the variable name . For example, if the user name should consist only of lowercase and uppercase alphanumeric characters, overrides the default regular expression in the variable definition:
@Path("users/{username: [a-zA-Z][a-zA-Z_0-9]}")
In this example, the username variable will only match usernames that start with a single uppercase or lowercase letter and zero or more alphanumeric characters and an underscore. If the username does not match this pattern, a 404 (Not Found) response will be sent to the client.
So your example
@Path("{image:image/.*}")
defines a URI template variable named image that contains a segment matching the regular expression
image/.*
This way, the JAX-RS environment will use your annotated method to query URIs matching
http://somehost.com/context-path/image/[anything]
Presumably your method will have a parameter
@Path("{image:image/.*}") public Response handle(@PathParam("image") String path) { }
and path will have the value "image/[anything]" .