users@jersey.java.net

duplicate reousrce path

From: Christian Helmbold <christian.helmbold_at_yahoo.de>
Date: Fri, 12 Nov 2010 17:50:12 +0000 (GMT)

Hi,

when I use the UriBuilder with the fromResource method, I get an URI containing
the resource path twice. Is something wrong with the following code?

@Path("/organisationen/")
public class OrganisationResource {

        ...
    // in a @POST method:
    return Response.created(
            UriBuilder.fromResource(OrganisationResource.class)
            .path("{id}").build(organisation.getId())
        ).build();
        
The HTTP header:
Location: http://localhost:8080/organisationen/organisationen/1

Is it a bug or my mistake?

Christian

 --
http://scala-forum.org/