Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-6020

UrilInfo.getAbsolutePath() missing path separator between servlet url and relative url

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1
    • 2.7.13, 3.0.2, 3.1
    • JAX-RS
    • None
    • Unknown

    Description

      @Path("/bookstore")
      @Produces("application/xml")
      public class BookStore {
          @Context 
          private UriInfo ui;
      
          @GET
          @Path("/books/{id}")
          public Response getBookRoot(@PathParam("id") Long id) {
              System.out.println(ui.getAbsolutePath());
              Book b = books.get(id);
              if (b == null) {
                  return Response.status(Status.NOT_FOUND).build();
              }
              return Response.ok(b).build();
          }
      }
      

      The GET call prints: http://localhost:8888bookstore/books/123 .

      Attachments

        Activity

          People

            ashakirin Andrei Shakirin
            ashakirin Andrei Shakirin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: