users@jersey.java.net

Re: [Jersey] Forward (or include) from one resource to another (no JSP)

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 02 Dec 2009 16:07:28 +0100

On Dec 2, 2009, at 2:43 PM, gerard davison wrote:

>
> Paul,
>
> Would it be possible to extend this interface to take relative and
> absolute paths so I can more easily get hold of specific classes on
> the same server?
>
> interface Resource
> {
> public <T> getResource(Class<T> input);
>
> // These method will throw a suitable run time exception if the
> resource class doesn't match
> // ideally the input should be able to be an interface in these
> cases
>
> // The path is relative to the current resource can also but
> absolute with relation to the root
> // of the jersey application if the path starts with a "/"
> public <T> getResource(Class<T> input, String path);
>
> // For the moment if the URI is for another server then fail
> // Ideally if provided with an interface would use client
> proxying code.
> public <T> getResource(Class<T> input, URI uri);
>
> }
>
> This could really help writing HATEOAS style clients.
>

Good idea, could you log an enhancement so we do not loose track of
this.

Paul.