Re: Re: Google AppEngine and Restlet

2009-04-16 Thread Rémi Dewitte
I am relieved :).

Rémi

On Thu, Apr 16, 2009 at 14:37, Jerome Louvel wrote:

>  Remi,
>
> The port is straightforward and will probably be (semi-)automated.
>
>  Best regards,
> Jerome Louvel
> --
> Restlet ~ Founder and Lead developer ~ http://www.restlet.org
> Noelios Technologies ~ Co-founder ~ http://www.noelios.com
>  **
>
>  --
> *De :* remidewi...@gmail.com [mailto:remidewi...@gmail.com] *De la part de
> * Rémi Dewitte
> *Envoyé :* jeudi 16 avril 2009 10:41
>
> *À :* discuss@restlet.tigris.org
> *Objet :* Re: Re: Google AppEngine and Restlet
>
> Jérôme,
>
> That is really cool. I was quite sure I was missing some point !
>
> Are you not worried nevertheless to sync compatible changes between
> org.restlet/ and org.restlet.gae/ in the long term ? For example when
> ServerResource evolves or for bug fixes.
>
> Best regards,
> Rémi
>
> On Thu, Apr 16, 2009 at 10:09, Jerome Louvel wrote:
>
>>  Hi Remi,
>>
>> As long as the extension only relies on GAE's white listed JRE classes, it
>> will work without any modification (example: the FreeMarker extension). Your
>> dream can come true already :-)
>>
>> In the recent version of "org.restlet.gae.jar", the packages are the same
>> as in "org.restlet.jar" so it should be easy to leverage Restlet extensions
>> that are compatible with GAE.
>>
>> As a result, it should be possible to deploy existing Restlet applications
>> in GAE without any modification, as long as their are compatible with GAE's
>> environment of course.
>>
>>  Best regards,
>> Jerome Louvel
>> --
>> Restlet ~ Founder and Lead developer ~ http://www.restlet.org
>> Noelios Technologies ~ Co-founder ~ http://www.noelios.com
>>
>>
>>
>>  --
>> *De :* remidewi...@gmail.com [mailto:remidewi...@gmail.com] *De la part
>> de* Rémi Dewitte
>> *Envoyé :* mercredi 15 avril 2009 23:02
>> *À :* discuss@restlet.tigris.org
>> *Objet :* Re: Re: Google AppEngine and Restlet
>>
>>   Jérôme,
>>
>> As far as I understand, we can't reuse Restlet extensions made for
>> org.restlet.* with org.restlet.gae.* classes, can we ?
>> I have thought at a time that GAE would be a deployment option for our
>> restlet applications. With the gae copy, we may not reuse an application as
>> straitforward as I may have dreamed. I see Restlet extensible enough not to
>> have to copy the full code base. Would that dream have been possible with
>> 1.1 with the API and Engine separation ?
>>
>> Why should not we support this scenario ;) ?
>>
>> Thanks,
>> Rémi
>>
>> On Wed, Apr 15, 2009 at 22:29, Jerome Louvel 
>> wrote:
>>
>>> Hi Richy,
>>>
>>> Thanks for sharing your experience!
>>>
>>> When I did the adaptation of Restlet to GAE (resulting in the new
>>> "org.restlet.gae.jar" available in recent snapshots), I took the source
>>> code
>>> and had to remove many classes that didn't compile due to the lack of
>>> sockets and SSL support (mainly the internal connectors).
>>>
>>> I'm surprised that the "org.restlet.jar" works despite this and I'm not
>>> sure
>>> if we should support this usage scenario. In addition,
>>> "org.restlet.gae.jar"
>>> includes the ServerServlet, the JavaMail and the JDK's Net connectors. In
>>> the future, it will leverage other GAE APIs.
>>>
>>> Regarding FreeMarker, the ContextTemplateLoader I just added to SVN trunk
>>> will probably help simplifying its usage in GAE with Restlet. Let me know
>>> if
>>> you have a chance to test it.
>>>
>>> Best regards,
>>> Jerome Louvel
>>> --
>>> Restlet ~ Founder and Lead developer ~ http://www.restlet.org
>>> Noelios Technologies ~ Co-founder ~ http://www.noelios.com
>>>
>>>
>>>
>>> -Message d'origine-
>>> De : webp...@tigris.org [mailto:webp...@tigris.org]
>>> Envoyé : samedi 11 avril 2009 14:49
>>> À : discuss@restlet.tigris.org
>>> Objet : RE: Re: Google AppEngine and Restlet
>>>
>>> After a bit of experimentation I have managed to get a Restlet/Freemarker
>>> stack running on GAE.
>>>
>>> The basic steps I took were :
>>>
>>> 1. Modify ServletConverter and ServletContextAdapter as detailed below.
>>>
>>> Basically this means replacing the calls to

RE: Re: Google AppEngine and Restlet

2009-04-16 Thread Jerome Louvel
Remi,
 
The port is straightforward and will probably be (semi-)automated.
 
Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~  <http://www.restlet.org/>
http://www.restlet.org
Noelios Technologies ~ Co-founder ~  <http://www.noelios.com>
http://www.noelios.com

 
  _  

De : remidewi...@gmail.com [mailto:remidewi...@gmail.com] De la part de Rémi
Dewitte
Envoyé : jeudi 16 avril 2009 10:41
À : discuss@restlet.tigris.org
Objet : Re: Re: Google AppEngine and Restlet


Jérôme,

That is really cool. I was quite sure I was missing some point !

Are you not worried nevertheless to sync compatible changes between
org.restlet/ and org.restlet.gae/ in the long term ? For example when
ServerResource evolves or for bug fixes.

Best regards,
Rémi


On Thu, Apr 16, 2009 at 10:09, Jerome Louvel 
wrote:


Hi Remi,
 
As long as the extension only relies on GAE's white listed JRE classes, it
will work without any modification (example: the FreeMarker extension). Your
dream can come true already :-)
 
In the recent version of "org.restlet.gae.jar", the packages are the same as
in "org.restlet.jar" so it should be easy to leverage Restlet extensions
that are compatible with GAE. 
 
As a result, it should be possible to deploy existing Restlet applications
in GAE without any modification, as long as their are compatible with GAE's
environment of course.

 


Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~  <http://www.restlet.org/>
http://www.restlet.org
Noelios Technologies ~ Co-founder ~  <http://www.noelios.com/>
http://www.noelios.com
 
 

  _  

De : remidewi...@gmail.com [mailto:remidewi...@gmail.com] De la part de Rémi
Dewitte
Envoyé : mercredi 15 avril 2009 23:02 

À : discuss@restlet.tigris.org

Objet : Re: Re: Google AppEngine and Restlet


Jérôme,

As far as I understand, we can't reuse Restlet extensions made for
org.restlet.* with org.restlet.gae.* classes, can we ?
I have thought at a time that GAE would be a deployment option for our
restlet applications. With the gae copy, we may not reuse an application as
straitforward as I may have dreamed. I see Restlet extensible enough not to
have to copy the full code base. Would that dream have been possible with
1.1 with the API and Engine separation ?

Why should not we support this scenario ;) ?

Thanks,
Rémi


On Wed, Apr 15, 2009 at 22:29, Jerome Louvel 
wrote:


Hi Richy,

Thanks for sharing your experience!

When I did the adaptation of Restlet to GAE (resulting in the new
"org.restlet.gae.jar" available in recent snapshots), I took the source code
and had to remove many classes that didn't compile due to the lack of
sockets and SSL support (mainly the internal connectors).

I'm surprised that the "org.restlet.jar" works despite this and I'm not sure
if we should support this usage scenario. In addition, "org.restlet.gae.jar"
includes the ServerServlet, the JavaMail and the JDK's Net connectors. In
the future, it will leverage other GAE APIs.

Regarding FreeMarker, the ContextTemplateLoader I just added to SVN trunk
will probably help simplifying its usage in GAE with Restlet. Let me know if
you have a chance to test it.


Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com



-Message d'origine-

De : webp...@tigris.org [mailto:webp...@tigris.org]
Envoyé : samedi 11 avril 2009 14:49

À : discuss@restlet.tigris.org

Objet : RE: Re: Google AppEngine and Restlet


After a bit of experimentation I have managed to get a Restlet/Freemarker
stack running on GAE.

The basic steps I took were :

1. Modify ServletConverter and ServletContextAdapter as detailed below.

Basically this means replacing the calls to new ServletLogger with
Logger.getLogger e.g. in the ServletConverter constructor do something
like...

super(new Context(Logger.getLogger(ServletConverter.class.getName(;

2. Add org.freemarker.jar, org.restlet.jar, org.restlet.ext.servlet.jar and
org.restlet.ext.freemarker.jar to the WEB-INF/lib of your google app project
and add to the build path.

3. Follow usual setup for getting Restlet working in a Servlet environment.
Folow the HelloWorld tutorial in the getting started docs -  it should work
fine locally (even without doing step 1. However, you'll need to replace
these calls in order to get it to run in the real GAE)

4.  Freemarker was a little more tricky, but not much.  Create a freemarker
configuration that uses the class template loader and put this in the
Restlet Application context attributes.

5. Make sure your templates are somewhere on the class path.

6. Use the TemplateRepresentation along with your freemarker config from the
context attributes

7. Make sure it works locally and upload to the app engine.

Hopefully I'll get a chance to write 

RE: Re: Google AppEngine and Restlet

2009-04-16 Thread Jerome Louvel
Hi Zsolt,

Restlet/GWT should definitely work with GAE. From a GAE point of view,
everything will look like compiled Javascript files served statically by
your Restlet/GAE application. 

On the server-side, you can definitely use Restlet instead of GWT-RPC. The
GwtShellServletWrapper is even included in the "org.restlet.gae.jar" file.
http://www.restlet.org/documentation/snapshot/gae/org/restlet/util/GwtShellS
ervletWrapper.html

Let us know if you encounter any difficulty.
 
Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com


-Message d'origine-
De : Zsolt Kovacs [mailto:zs.m...@gmail.com] 
Envoyé : jeudi 16 avril 2009 13:11
À : discuss@restlet.tigris.org
Objet : RE: Re: Google AppEngine and Restlet

Hi Jerome,

In the ligth of this, willl the Restlet GWT extension work on GAE? I am
learning GEA and GWT and before I start to investigate, I would appreciate
your feedback.

Regard,

Zsolt

> Hi Remi,
>  
> As long as the extension only relies on GAE's white listed JRE 
> classes, it will work without any modification (example: the 
> FreeMarker extension). Your dream can come true already :-)
>  
> In the recent version of "org.restlet.gae.jar", the packages are the 
> same as in "org.restlet.jar" so it should be easy to leverage Restlet 
> extensions that are compatible with GAE.
>  
> As a result, it should be possible to deploy existing Restlet 
> applications in GAE without any modification, as long as their are 
> compatible with GAE's environment of course.
>  
> Best regards,
> Jerome Louvel
> --
> Restlet ~ Founder and Lead developer ~  <http://www.restlet.org/> 
> http://www.restlet.org Noelios Technologies ~ Co-founder ~  
> <http://www.noelios.com/> http://www.noelios.com
>  
>

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=17453
49

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1746449


RE: Re: Google AppEngine and Restlet

2009-04-16 Thread Zsolt Kovacs
Hi Jerome,

In the ligth of this, willl the Restlet GWT extension work on GAE? I am 
learning GEA and GWT and before I start to investigate, I would appreciate your 
feedback.

Regard,

Zsolt

> Hi Remi,
>  
> As long as the extension only relies on GAE's white listed JRE classes, it
> will work without any modification (example: the FreeMarker extension). Your
> dream can come true already :-)
>  
> In the recent version of "org.restlet.gae.jar", the packages are the same as
> in "org.restlet.jar" so it should be easy to leverage Restlet extensions
> that are compatible with GAE. 
>  
> As a result, it should be possible to deploy existing Restlet applications
> in GAE without any modification, as long as their are compatible with GAE's
> environment of course.
>  
> Best regards,
> Jerome Louvel
> --
> Restlet ~ Founder and Lead developer ~  
> http://www.restlet.org
> Noelios Technologies ~ Co-founder ~  
> http://www.noelios.com
>  
>

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1745349


Re: Re: Google AppEngine and Restlet

2009-04-16 Thread Rémi Dewitte
Jérôme,

That is really cool. I was quite sure I was missing some point !

Are you not worried nevertheless to sync compatible changes between
org.restlet/ and org.restlet.gae/ in the long term ? For example when
ServerResource evolves or for bug fixes.

Best regards,
Rémi

On Thu, Apr 16, 2009 at 10:09, Jerome Louvel wrote:

>  Hi Remi,
>
> As long as the extension only relies on GAE's white listed JRE classes, it
> will work without any modification (example: the FreeMarker extension). Your
> dream can come true already :-)
>
> In the recent version of "org.restlet.gae.jar", the packages are the same
> as in "org.restlet.jar" so it should be easy to leverage Restlet extensions
> that are compatible with GAE.
>
> As a result, it should be possible to deploy existing Restlet applications
> in GAE without any modification, as long as their are compatible with GAE's
> environment of course.
>
>  Best regards,
> Jerome Louvel
> --
> Restlet ~ Founder and Lead developer ~ http://www.restlet.org
> Noelios Technologies ~ Co-founder ~ http://www.noelios.com
>
>
>
>  --
> *De :* remidewi...@gmail.com [mailto:remidewi...@gmail.com] *De la part de
> * Rémi Dewitte
> *Envoyé :* mercredi 15 avril 2009 23:02
> *À :* discuss@restlet.tigris.org
> *Objet :* Re: Re: Google AppEngine and Restlet
>
> Jérôme,
>
> As far as I understand, we can't reuse Restlet extensions made for
> org.restlet.* with org.restlet.gae.* classes, can we ?
> I have thought at a time that GAE would be a deployment option for our
> restlet applications. With the gae copy, we may not reuse an application as
> straitforward as I may have dreamed. I see Restlet extensible enough not to
> have to copy the full code base. Would that dream have been possible with
> 1.1 with the API and Engine separation ?
>
> Why should not we support this scenario ;) ?
>
> Thanks,
> Rémi
>
> On Wed, Apr 15, 2009 at 22:29, Jerome Louvel wrote:
>
>> Hi Richy,
>>
>> Thanks for sharing your experience!
>>
>> When I did the adaptation of Restlet to GAE (resulting in the new
>> "org.restlet.gae.jar" available in recent snapshots), I took the source
>> code
>> and had to remove many classes that didn't compile due to the lack of
>> sockets and SSL support (mainly the internal connectors).
>>
>> I'm surprised that the "org.restlet.jar" works despite this and I'm not
>> sure
>> if we should support this usage scenario. In addition,
>> "org.restlet.gae.jar"
>> includes the ServerServlet, the JavaMail and the JDK's Net connectors. In
>> the future, it will leverage other GAE APIs.
>>
>> Regarding FreeMarker, the ContextTemplateLoader I just added to SVN trunk
>> will probably help simplifying its usage in GAE with Restlet. Let me know
>> if
>> you have a chance to test it.
>>
>> Best regards,
>> Jerome Louvel
>> --
>> Restlet ~ Founder and Lead developer ~ http://www.restlet.org
>> Noelios Technologies ~ Co-founder ~ http://www.noelios.com
>>
>>
>>
>> -Message d'origine-
>> De : webp...@tigris.org [mailto:webp...@tigris.org]
>> Envoyé : samedi 11 avril 2009 14:49
>> À : discuss@restlet.tigris.org
>> Objet : RE: Re: Google AppEngine and Restlet
>>
>> After a bit of experimentation I have managed to get a Restlet/Freemarker
>> stack running on GAE.
>>
>> The basic steps I took were :
>>
>> 1. Modify ServletConverter and ServletContextAdapter as detailed below.
>>
>> Basically this means replacing the calls to new ServletLogger with
>> Logger.getLogger e.g. in the ServletConverter constructor do something
>> like...
>>
>> super(new Context(Logger.getLogger(ServletConverter.class.getName(;
>>
>> 2. Add org.freemarker.jar, org.restlet.jar, org.restlet.ext.servlet.jar
>> and
>> org.restlet.ext.freemarker.jar to the WEB-INF/lib of your google app
>> project
>> and add to the build path.
>>
>> 3. Follow usual setup for getting Restlet working in a Servlet
>> environment.
>> Folow the HelloWorld tutorial in the getting started docs -  it should
>> work
>> fine locally (even without doing step 1. However, you'll need to replace
>> these calls in order to get it to run in the real GAE)
>>
>> 4.  Freemarker was a little more tricky, but not much.  Create a
>> freemarker
>> configuration that uses the class template loader and put this in the
>> Restlet Application context attributes.
>>
>> 5. Make sure your templ

RE: Re: Google AppEngine and Restlet

2009-04-16 Thread Jerome Louvel
Hi Remi,
 
As long as the extension only relies on GAE's white listed JRE classes, it
will work without any modification (example: the FreeMarker extension). Your
dream can come true already :-)
 
In the recent version of "org.restlet.gae.jar", the packages are the same as
in "org.restlet.jar" so it should be easy to leverage Restlet extensions
that are compatible with GAE. 
 
As a result, it should be possible to deploy existing Restlet applications
in GAE without any modification, as long as their are compatible with GAE's
environment of course.
 
Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~  <http://www.restlet.org/>
http://www.restlet.org
Noelios Technologies ~ Co-founder ~  <http://www.noelios.com/>
http://www.noelios.com
 
 

  _  

De : remidewi...@gmail.com [mailto:remidewi...@gmail.com] De la part de Rémi
Dewitte
Envoyé : mercredi 15 avril 2009 23:02
À : discuss@restlet.tigris.org
Objet : Re: Re: Google AppEngine and Restlet


Jérôme,

As far as I understand, we can't reuse Restlet extensions made for
org.restlet.* with org.restlet.gae.* classes, can we ?
I have thought at a time that GAE would be a deployment option for our
restlet applications. With the gae copy, we may not reuse an application as
straitforward as I may have dreamed. I see Restlet extensible enough not to
have to copy the full code base. Would that dream have been possible with
1.1 with the API and Engine separation ?

Why should not we support this scenario ;) ?

Thanks,
Rémi


On Wed, Apr 15, 2009 at 22:29, Jerome Louvel 
wrote:


Hi Richy,

Thanks for sharing your experience!

When I did the adaptation of Restlet to GAE (resulting in the new
"org.restlet.gae.jar" available in recent snapshots), I took the source code
and had to remove many classes that didn't compile due to the lack of
sockets and SSL support (mainly the internal connectors).

I'm surprised that the "org.restlet.jar" works despite this and I'm not sure
if we should support this usage scenario. In addition, "org.restlet.gae.jar"
includes the ServerServlet, the JavaMail and the JDK's Net connectors. In
the future, it will leverage other GAE APIs.

Regarding FreeMarker, the ContextTemplateLoader I just added to SVN trunk
will probably help simplifying its usage in GAE with Restlet. Let me know if
you have a chance to test it.


Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com



-Message d'origine-

De : webp...@tigris.org [mailto:webp...@tigris.org]
Envoyé : samedi 11 avril 2009 14:49

À : discuss@restlet.tigris.org

Objet : RE: Re: Google AppEngine and Restlet


After a bit of experimentation I have managed to get a Restlet/Freemarker
stack running on GAE.

The basic steps I took were :

1. Modify ServletConverter and ServletContextAdapter as detailed below.

Basically this means replacing the calls to new ServletLogger with
Logger.getLogger e.g. in the ServletConverter constructor do something
like...

super(new Context(Logger.getLogger(ServletConverter.class.getName(;

2. Add org.freemarker.jar, org.restlet.jar, org.restlet.ext.servlet.jar and
org.restlet.ext.freemarker.jar to the WEB-INF/lib of your google app project
and add to the build path.

3. Follow usual setup for getting Restlet working in a Servlet environment.
Folow the HelloWorld tutorial in the getting started docs -  it should work
fine locally (even without doing step 1. However, you'll need to replace
these calls in order to get it to run in the real GAE)

4.  Freemarker was a little more tricky, but not much.  Create a freemarker
configuration that uses the class template loader and put this in the
Restlet Application context attributes.

5. Make sure your templates are somewhere on the class path.

6. Use the TemplateRepresentation along with your freemarker config from the
context attributes

7. Make sure it works locally and upload to the app engine.

Hopefully I'll get a chance to write this up properly over easter, but it
wasn't too bad and looks promising so far.

Cheers,

Richy
http://wiredupandfiredup.com

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447
<http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1648
5> &dsMessageId=16485
97

--

http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447
<http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1732
294> &dsMessageId=1732294

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1742703

Re: Re: Google AppEngine and Restlet

2009-04-16 Thread Rémi Dewitte
Jérôme,

As far as I understand, we can't reuse Restlet extensions made for
org.restlet.* with org.restlet.gae.* classes, can we ?
I have thought at a time that GAE would be a deployment option for our
restlet applications. With the gae copy, we may not reuse an application as
straitforward as I may have dreamed. I see Restlet extensible enough not to
have to copy the full code base. Would that dream have been possible with
1.1 with the API and Engine separation ?

Why should not we support this scenario ;) ?

Thanks,
Rémi

On Wed, Apr 15, 2009 at 22:29, Jerome Louvel wrote:

> Hi Richy,
>
> Thanks for sharing your experience!
>
> When I did the adaptation of Restlet to GAE (resulting in the new
> "org.restlet.gae.jar" available in recent snapshots), I took the source
> code
> and had to remove many classes that didn't compile due to the lack of
> sockets and SSL support (mainly the internal connectors).
>
> I'm surprised that the "org.restlet.jar" works despite this and I'm not
> sure
> if we should support this usage scenario. In addition,
> "org.restlet.gae.jar"
> includes the ServerServlet, the JavaMail and the JDK's Net connectors. In
> the future, it will leverage other GAE APIs.
>
> Regarding FreeMarker, the ContextTemplateLoader I just added to SVN trunk
> will probably help simplifying its usage in GAE with Restlet. Let me know
> if
> you have a chance to test it.
>
> Best regards,
> Jerome Louvel
> --
> Restlet ~ Founder and Lead developer ~ http://www.restlet.org
> Noelios Technologies ~ Co-founder ~ http://www.noelios.com
>
>
>
> -Message d'origine-----
> De : webp...@tigris.org [mailto:webp...@tigris.org]
> Envoyé : samedi 11 avril 2009 14:49
> À : discuss@restlet.tigris.org
> Objet : RE: Re: Google AppEngine and Restlet
>
> After a bit of experimentation I have managed to get a Restlet/Freemarker
> stack running on GAE.
>
> The basic steps I took were :
>
> 1. Modify ServletConverter and ServletContextAdapter as detailed below.
>
> Basically this means replacing the calls to new ServletLogger with
> Logger.getLogger e.g. in the ServletConverter constructor do something
> like...
>
> super(new Context(Logger.getLogger(ServletConverter.class.getName(;
>
> 2. Add org.freemarker.jar, org.restlet.jar, org.restlet.ext.servlet.jar and
> org.restlet.ext.freemarker.jar to the WEB-INF/lib of your google app
> project
> and add to the build path.
>
> 3. Follow usual setup for getting Restlet working in a Servlet environment.
> Folow the HelloWorld tutorial in the getting started docs -  it should work
> fine locally (even without doing step 1. However, you'll need to replace
> these calls in order to get it to run in the real GAE)
>
> 4.  Freemarker was a little more tricky, but not much.  Create a freemarker
> configuration that uses the class template loader and put this in the
> Restlet Application context attributes.
>
> 5. Make sure your templates are somewhere on the class path.
>
> 6. Use the TemplateRepresentation along with your freemarker config from
> the
> context attributes
>
> 7. Make sure it works locally and upload to the app engine.
>
> Hopefully I'll get a chance to write this up properly over easter, but it
> wasn't too bad and looks promising so far.
>
> Cheers,
>
> Richy
> http://wiredupandfiredup.com
>
> --
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=16485
> 97
>
> --
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1732294
>

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1732825

RE: Re: Google AppEngine and Restlet

2009-04-15 Thread Jerome Louvel
Hi Richy,

Thanks for sharing your experience!

When I did the adaptation of Restlet to GAE (resulting in the new
"org.restlet.gae.jar" available in recent snapshots), I took the source code
and had to remove many classes that didn't compile due to the lack of
sockets and SSL support (mainly the internal connectors).

I'm surprised that the "org.restlet.jar" works despite this and I'm not sure
if we should support this usage scenario. In addition, "org.restlet.gae.jar"
includes the ServerServlet, the JavaMail and the JDK's Net connectors. In
the future, it will leverage other GAE APIs.

Regarding FreeMarker, the ContextTemplateLoader I just added to SVN trunk
will probably help simplifying its usage in GAE with Restlet. Let me know if
you have a chance to test it.
 
Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com

 

-Message d'origine-
De : webp...@tigris.org [mailto:webp...@tigris.org] 
Envoyé : samedi 11 avril 2009 14:49
À : discuss@restlet.tigris.org
Objet : RE: Re: Google AppEngine and Restlet

After a bit of experimentation I have managed to get a Restlet/Freemarker
stack running on GAE.

The basic steps I took were :

1. Modify ServletConverter and ServletContextAdapter as detailed below.

Basically this means replacing the calls to new ServletLogger with
Logger.getLogger e.g. in the ServletConverter constructor do something
like...

super(new Context(Logger.getLogger(ServletConverter.class.getName(;

2. Add org.freemarker.jar, org.restlet.jar, org.restlet.ext.servlet.jar and
org.restlet.ext.freemarker.jar to the WEB-INF/lib of your google app project
and add to the build path.

3. Follow usual setup for getting Restlet working in a Servlet environment.
Folow the HelloWorld tutorial in the getting started docs -  it should work
fine locally (even without doing step 1. However, you'll need to replace
these calls in order to get it to run in the real GAE)

4.  Freemarker was a little more tricky, but not much.  Create a freemarker
configuration that uses the class template loader and put this in the
Restlet Application context attributes.

5. Make sure your templates are somewhere on the class path.

6. Use the TemplateRepresentation along with your freemarker config from the
context attributes 

7. Make sure it works locally and upload to the app engine.  

Hopefully I'll get a chance to write this up properly over easter, but it
wasn't too bad and looks promising so far.

Cheers,

Richy
http://wiredupandfiredup.com

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=16485
97

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1732294


RE: Re: Google AppEngine and Restlet

2009-04-12 Thread webpost
After a bit of experimentation I have managed to get a Restlet/Freemarker stack 
running on GAE.

The basic steps I took were :

1. Modify ServletConverter and ServletContextAdapter as detailed below.

Basically this means replacing the calls to new ServletLogger with 
Logger.getLogger e.g. in the ServletConverter constructor do something like...

super(new Context(Logger.getLogger(ServletConverter.class.getName(;

2. Add org.freemarker.jar, org.restlet.jar, org.restlet.ext.servlet.jar and 
org.restlet.ext.freemarker.jar to the WEB-INF/lib of your google app project 
and add to the build path.

3. Follow usual setup for getting Restlet working in a Servlet environment.  
Folow the HelloWorld tutorial in the getting started docs -  it should work 
fine locally (even without doing step 1. However, you'll need to replace these 
calls in order to get it to run in the real GAE)

4.  Freemarker was a little more tricky, but not much.  Create a freemarker 
configuration that uses the class template loader and put this in the Restlet 
Application context attributes.

5. Make sure your templates are somewhere on the class path.

6. Use the TemplateRepresentation along with your freemarker config from the 
context attributes 

7. Make sure it works locally and upload to the app engine.  

Hopefully I'll get a chance to write this up properly over easter, but it 
wasn't too bad and looks promising so far.

Cheers,

Richy
http://wiredupandfiredup.com

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1648597