cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrei Shakirin (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CXF-6020) UrilInfo.getAbsolutePath() missing path separator between servlet url and relative url
Date Tue, 23 Sep 2014 08:39:33 GMT
Andrei Shakirin created CXF-6020:
------------------------------------

             Summary: UrilInfo.getAbsolutePath() missing path separator between servlet url
and relative url
                 Key: CXF-6020
                 URL: https://issues.apache.org/jira/browse/CXF-6020
             Project: CXF
          Issue Type: Bug
          Components: JAX-RS
    Affects Versions: 3.1.0
            Reporter: Andrei Shakirin
            Assignee: Andrei Shakirin


{code}
@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();
    }
}
{code}

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




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message