title: Jersey's path match "sandbox" or empty string
body: <p>I'm having a problem with Jersey @Path where I wish to implement a sandbox environment for my system. Basically disabling or enabling the sandbox mode by the given url that could look like this:</p>
  
  <p>Sandbox site</p>
  
  <blockquote>
    <p>GET: ../MyProject/sandbox/data</p>
  </blockquote>
  
  <p>regular site</p>
  
  <blockquote>
    <p>GET: ../MyProject/data</p>
  </blockquote>
  
  <p>I though a way to go where to use regular expression for Path connected to my project root class.</p>
  
  <pre><code>@Path("/{mode:sandbox|}")
  public class JerseyResource{
  
      boolean isSandbox = false;
  
      public JerseyResource(@PathParam("mode") String mode) {
          if(mode.equals("sandbox"))
              isSandbox = true;
      }
  
      @GET
      @Path("data")
      @Produces(MediaType.TEXT_PLAIN)
      public Response data() {
          if(isSandbox) 
              return Response.ok("Sandbox is on").build();
          return Response.ok("Sandbox is off").build();
      }
  }
  </code></pre>
  
  <p>It works fine to try "GET: ../MyProject/sandbox/data" and it returns "Sandbox is on". 
  But when I do "GET: ../MyProject/data" it just return me a 404 page not found.</p>
  
  <p>Is there a way here to use an empty string for the path url as an argument in Jersey as the same time taking a fixed string?</p>