I read your questions as this.
Your method
@GET
@Path('/resource/{decimal}')
public Response getResoureWithDecimal(@PathParam("decimal") double decimal)
Your request
GET /resource/1,2
Clearly, 1,2
is not a Java double
and JAX-RS has no way to convert it to one.
Possible solution
Use a String
as the parameter type and convert it with your own converter.
@GET
@Path('/resource/{decimal}')
public Response getResoureWithDecimal(@PathParam("decimal") String decimal) {
double decimalAsDouble = convertStringWithCommaToDouble(decimal);
// ...
}
The implementation of convertStringWithCommaToDouble(String)
is up to you.