Package cambridge

Examples of cambridge.DirectoryTemplateLoader


         Logger.getLogger(Benchmarking.class.getName()).log(Level.SEVERE, null, ex);
      }
   }

   public void renderCambridge(int loop, String expressionLanguage) {
      DirectoryTemplateLoader templateLoader = new DirectoryTemplateLoader(
         new File("src/main/cambridgetemplates/" + expressionLanguage), "utf-8", -1);

      TemplateFactory tf = templateLoader.newTemplateFactory("skeleton.html");

      for (int i = 0; i < loop; i++) {
         Template template = tf.createTemplate();
         DataModel.User loggedInUser = model.getLoggedInUser();
         template.setProperty("title", "Entries");
View Full Code Here


   public void init(ServletConfig config) throws ServletException {
      initData();

      ServletContext ctx = config.getServletContext();
      File templateDir = new File(ctx.getRealPath("/WEB-INF/templates"));
      TemplateLoader loader = new DirectoryTemplateLoader(templateDir, "UTF-8");
      tf = loader.newTemplateFactory("users.html");
   }
View Full Code Here

         Logger.getLogger(Benchmarking.class.getName()).log(Level.SEVERE, null, ex);
      }
   }

   public void renderCambridge(int loop, String expressionLanguage) {
      DirectoryTemplateLoader templateLoader = new DirectoryTemplateLoader(
         new File("src/main/cambridgetemplates/" + expressionLanguage), "utf-8", -1);

      TemplateFactory tf = templateLoader.newTemplateFactory("skeleton.html", Expressions.cambridgeExpressionLanguage);

      for (int i = 0; i < loop; i++) {
         Template template = tf.createTemplate();
         DataModel.User loggedInUser = model.getLoggedInUser();
         template.setProperty("title", "Entries");
View Full Code Here

   public void init(ServletConfig config) throws ServletException {
      initData();

      ServletContext ctx = config.getServletContext();
      File templateDir = new File(ctx.getRealPath("/WEB-INF/templates"));
      TemplateLoader loader = new DirectoryTemplateLoader(templateDir, "UTF-8");
      tf = loader.newTemplateFactory("users.html", Expressions.cambridgeExpressionLanguage);
   }
View Full Code Here

    @Override
    public void afterPropertiesSet() throws Exception
    {
        Expressions.registerExpressionLanguage(expressionLanguage, SpringExpressionLanguage.class);
        templateLoader = new DirectoryTemplateLoader(new File(servletContext.getRealPath(templatePath)), templateEncoding, changeDetectionInterval);
        exp = Expressions.getExpressionLanguageByName(expressionLanguage);
    }
View Full Code Here

TOP

Related Classes of cambridge.DirectoryTemplateLoader

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.