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

Reply via email to