Optional @PathParam in Jax-RS

The problem was the lack of whitespace before the colon:

@Path("/mypath{param1: (/param1)?}")

should be:

@Path("/mypath{param1 : (/param1)?}")

Apparently it’s a bug, because the specification makes the whitespace around the colon optional. I also found that I’m not the first bitten by this bug.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)