title: How to get only part of path from @Path?
body: <p>From the path ("/api/webservice/cursos/sugeridos/java-para-desenvolvimento-web") I need to get ("/api/webservice/cursos/").</p>
  
  <p>I have the class:</p>
  
  <pre><code>@Path("/webservice/cursos")
  public class Resource {
  
  @GET
      @Path("/sugeridos/{uri: [\\w+\\-]*}")
      .........
      public Response getCourseByURI(@PathParam("uri") String uri, @Context UriInfo uriInfo) {
                  String baseUrl = uriInfo.getAbsolutePath().getPath();
       }
  }
  </code></pre>
  
  <p>The <code>uriInfo.getAbsolutePath().getPath()</code> returns: </p>
  
  <blockquote>
    <p>"/api/webservice/cursos/sugeridos/java-para-desenvolvimento-web"</p>
  </blockquote>
  
  <p>I need only:</p>
  
  <blockquote>
    <p>"/api/webservice/cursos/"</p>
  </blockquote>