- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 24 Aug 2009 09:16:12 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/util In directory hutz:/tmp/cvs-serv32542/src/org/w3c/unicorn/util Added Files: Tag: dev2 Templates.java Log Message: removed template caching which is already supported by velocity --- NEW FILE: Templates.java --- package org.w3c.unicorn.util; import java.io.Writer; import org.apache.velocity.VelocityContext; import org.apache.velocity.exception.MethodInvocationException; import org.apache.velocity.exception.ParseErrorException; import org.apache.velocity.exception.ResourceNotFoundException; import org.w3c.unicorn.Framework; public class Templates { public static void write(String templateName, VelocityContext context, Writer writer) { try { Framework.getVelocityEngine().mergeTemplate(templateName, "UTF-8", context, writer); } catch (ResourceNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (ParseErrorException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (MethodInvocationException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
Received on Monday, 24 August 2009 09:16:21 UTC