title: Match empty path parameters in REST
body: <p>I have a service in rest that looks like:</p>
  
  <pre><code>@GET
  @Path("get-policy/{policyNumber}/{endorsement}/{type}")
  @Produces(MediaType.APPLICATION_XML)
  public String getPolicyIndividual(
          @PathParam("policyNumber")String policyNumber,
          @PathParam("endorsement")String endorsement,
          @PathParam("type")String type){
            ...
          }
  </code></pre>
  
  <p>And i want to know if there is a way that i can accept every parameter as null value if they are not sent, so if somene makes a call to my service without the params or with not all the params still can match the definition of my service.
  Examples:</p>
  
  <pre><code>http://localhost:8080/service/policy/get-policy/
  </code></pre>
  
  <p>or this:</p>
  
  <pre><code>http://localhost:8080/service/policy/get-policy/5568
  </code></pre>
  
  <p>or this:</p>
  
  <pre><code>http://localhost:8080/service/policy/get-policy/5568/4
  </code></pre>
  
  <p>Im well aware that i can define a regex expression like in this <a href="https://stackoverflow.com/a/10152103/1181422">answer</a>, but in that case there was only 1 path param defined, what if i have more than one?</p>
  
  <p>That didnt work for me but maybe im doing something wrong, i tried this with no success:</p>
  
  <pre><code>@GET
  @Path("get-policy/{policyNumber: .*}/{endorsement: .*}/{type: .*}")
  @Produces(MediaType.APPLICATION_XML)
  public String getPolicyIndividual(
          @PathParam("policyNumber")String policyNumber,
          @PathParam("endorsement")String endorsement,
          @PathParam("type")String type){
            ...
          }
  </code></pre>
  
  <p>is the only way to achive this trough a POST? Im using Jersey btw!</p>