Re: [Simpleweb-Support] is there a simple template velocity howto ???
Brought to you by:
niallg
From: Niall G. <nia...@an...> - 2004-06-22 09:46:43
|
Hi, To use LoaderEngine with Velocity try this. // create a loader engine with the velocity container LoaderEngine engine = new MapperEngine(context, new VelocityContainer()); // make sure your service is a reflection service public MyService extends ReflectionService { priavte Container container; public MyService(Context context){ super(context); } public void prepare(Container container) { this.container = container; } public void process(Request req, Response resp) throws Exception { Document doc = container.lookup(""); doc.put("name", "value"); // etc .... } } Niall |