Hello Jim,
when passing a relative URI, the location reference is resolved
against the base reference of the request's resource
reference ("getRequest().getResourceRef().getBaseRef()").
Could you check the values of "getRequest().getResourceRef()" and
"getRequest().getResourceRef().getBaseRef()"?
best regards,
Thierry Boileau
On Wed, Feb 27, 2008 at 10:42 AM, Jim Alateras <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am trying to set the location header after a post to communicate the
> URL of the created resource. I basically use the following piece of code
> to set the location passing a relative uri
>
> getResponse().setLocationRef("sessionId");
>
> but i get the following error
>
> java.lang.IllegalArgumentException: Relative references are only usable
> when a base reference is set.
>
>
> Any ideas?
>
> cheers
> </jima>
>