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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 2.7.13, 3.0.2, 3.1
    • Component/s: JAX-RS
    • Labels:
      None
    • Estimated Complexity:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: