[
https://issues.apache.org/jira/browse/CXF-6020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14144557#comment-14144557
]
Andrei Shakirin commented on CXF-6020:
--------------------------------------
The result of UrilInfo.getAbsolutePath() is dependent on address set in
JAXRSServerFactoryBean:
sf.setAddress("http://localhost:8888/"); - works correct
sf.setAddress("http://localhost:8888"); - produces
"http://localhost:8888bookstore/books/123"
IMO we should check this and append path separator, if necessary
> 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)