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 <[email protected]>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 : [email protected] [mailto:[email protected]] > Envoyé : samedi 11 avril 2009 14:49 > À : [email protected] > 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

