users@jersey.java.net

invoking resource methods using relative URI than absolute URI

From: Arul Dhesiaseelan <arul_at_fluxcorp.com>
Date: Tue, 01 Jul 2008 09:57:13 -0600

Hello,

I have 2 resources: A & B

I would like to invoke A.m1() from B.m1().

I am currently using Jersey Client API in resource B to achieve this.

    Client c = Client.create();
    WebResource r =
c.resource("http://localhost:8080/rest/A/m1");//c.resource("/rest/A/m1") ?
    String result = r.accept("text/plain").get(String.class);

Is it possible to invoke the method using relative URI than using
absolute URI?

Thank you,
Arul