Hi Tobias,
could you override the ServerResource#doInit method instead of the
constructor?
Best regards,
Thierry Boileau
> Hi Jerome,
>
> I started to migrate to 2.0m7 now and I have an issue:
> If I call the getRequest().getRootRef().getIdentifier() method in the
> constructor of my Resource I get a java.lang.NullPointerException.
> My Resource extends the ServerResource class and that's what I do:
>
> public AlgorithmResource() {
> super();
> System.out.println("TEST: " +getRequest().getRootRef().getIdentifier());
> }
>
> @Get("html")
> public Representation toHtml(){
> ... some code ...
> }
>
> Has the way to get the root (or resource) uri changed from 1.1 to 2.0?
>
> Best Regards
> Tobias
>
> On Tue, 2010-01-05 at 22:29 +0000, Jerome Louvel wrote:
>
>> Hi Tobias,
>>
>> We haven't fully documented the migration guide yet. We will work on
>> that after our 2.0 RC1 release due this month. For now, here is the
>> early draft version available:
>> http://wiki.restlet.org/docs_2.0/13-restlet/171-restlet/155-restlet.html
>>
>> Please, let us know if you have any issue.
>>
>> Best regards,
>> Jerome Louvel
>> --
>> Restlet ~ Founder and Lead developer ~ http://www.restlet.org
>> Noelios Technologies ~ Co-founder ~ http://www.noelios.com
>>
>>
>> 2010/1/4<[email protected]>
>>
>>> Hello,
>>>
>>> I see that the restlet framework in version 2.0m6 has certainly more and
>>> better features than the old 1.1 version I am using. I wonder how difficult
>>> it is, to migrate to restlet 2.0 as it seems some API changes have taken
>>> place?
>>>
>>> best regards
>>> Tobias
>>>
>>> ------------------------------------------------------
>>> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2434634
>>>
>> ------------------------------------------------------
>> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2435029
>>
>
>
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2443772