Freemarkers templates loading

2010-10-22 Thread David Dumon
Hi, I'm trying to learn the Restlet framework. My project use JDK 1.6 / Maven2 / Freemarker / Servlet / Jetty with war deployment. My problem is the access to the Freemarkers templates. I want to put templates in the /src/main/webapp/templates directory. It seems to me that this is the best

Re: Freemarkers templates loading

2010-10-22 Thread Fabian Mandelbaum
Hello David, why not packing all the FreeMarker templates inside a jar and deploy that jar on your app's classpath? You can then do something like this: Configuration fmConfig = new Configuration(); fmConfig.setTemplateLoader(new ClassTemplateLoader(getClass(),

How to add header for http request

2010-10-22 Thread Android KC
I am new to restlet development, trying to add headers to do a http request, (the server required this headers included in the request) .. I tried the following code, but got 400 bad request, the header is not valid String url = http://x;; Client c = new Client(Protocol.HTTP); Request

android applications that use restlet

2010-10-22 Thread gato171
Hi to everyone, I'm researching about the ways to implement a Rest Client on Android for my application. Currently a have found two potential ways: 1) Use native libraries provided by Android (the hard way). 2) Use restlet framework. I need to know if there are applications based on

Re: How to add header for http request

2010-10-22 Thread Fabian Mandelbaum
Hello KC, for standard HTTP headers, take a look at http://wiki.restlet.org/docs_2.0/13-restlet/27-restlet/324-restlet/130-restlet.html for custom HTTP headers, you can use something like: /** * Set the value of a custom HTTP header * * @param header the custom HTTP header