Package org.apache.velocity.runtime.resource.loader

Examples of org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader


      velocityEngine = new VelocityEngine();
      //velocityEngine.setApplicationAttribute(VelocityEngine.RESOURCE_LOADER,
          //        new ClasspathResourceLoader());
      velocityEngine.setProperty("resource.loader", "error");
      velocityEngine.setProperty("error.resource.loader.instance",
          new ClasspathResourceLoader());
      velocityEngine.init(props);
    } catch (Exception e) {
      LOG.warn(e.getMessage());
    }
  }
View Full Code Here


public class TemplateHelper {
 
  private static final ResourceBundle bundle = ResourceBundle.getBundle("su4j");
 
  public static void fillTemplate(OutputStream out, VelocityContext ctx, String tpl) {
    InputStream is = (new ClasspathResourceLoader()).getResourceStream(bundle.getString("su4j.endpoint.tpl."+tpl));
    fillTemplate(out, ctx, is);
  }
View Full Code Here

TOP

Related Classes of org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.