Hello,

> Thanks Vincent,that's pretty way for restlet-1.1snapshot.I 
> used this way in restlet or resource:
> TemplateRepresentation templateRepr= new TemplateRepresentation(
>                 "/people.vm",
>                 MediaType.TEXT_HTML);
> ...
>         templateRepr.setDataModel(dataModel);
>         templateRepr.getEngine().setProperty(
>                 VelocityEngine.FILE_RESOURCE_LOADER_PATH,
>                 "E:/eclipse3.1RC3/workspace/RestletPractice/templates"
>             );
> response.setEntity(templateRepr);
> 
> I have a lot of problem about it:
> 1.How to use the relative path to set "file resource loader 
> path" property of velocity engine?It must to fullfill all of path?

You might be interested in this RFEs:

"Accept Velocity templates as representations"
http://restlet.tigris.org/issues/show_bug.cgi?id=268

"Support template inclusion for Freemarker and Velocity"
http://restlet.tigris.org/issues/show_bug.cgi?id=269

> 2.How to set once when a Velocitytemplate is 
> initialized,without set again when you use this template?
http://restlet.tigris.org/issues/show_bug.cgi?id=268

Maybe you could configure the Velocity engine in your Application
constructor instead of each time the TemplateRepresentation class is used?

Best regards,
Jerome  

Reply via email to