Package freemarker.template

Examples of freemarker.template.Version


        assertEquals("v10", cfg.getTemplate("t.ftl").toString()); // still v10
        assertEquals("v10", cfg.getTemplate("t.ftl").toString()); // still v10
    }
   
    public void testIncompatibleImprovementsChangesURLConCaching() throws IOException {
        Version newVersion = Configuration.VERSION_2_3_21;
        Version oldVersion = Configuration.VERSION_2_3_20;
       
        {
            Configuration cfg = new Configuration(oldVersion);
            cfg.setTemplateUpdateDelay(0);
            final MonitoredClassTemplateLoader templateLoader = new MonitoredClassTemplateLoader();
View Full Code Here


* @deprecated Will be removed, as a main method in a server-side library is marked as a security issue by many tools.
*/
public class CommandLine {
   
    public static void main(String[] args) {
        Version ver = Configuration.getVersion();
       
        System.out.println();
        System.out.print("FreeMarker version ");
        System.out.print(ver);
       
        /* If the version number doesn't already contain the build date and it's known, print it: */
        if (!ver.toString().endsWith("Z")
            && ver.getBuildDate() != null) {
          System.out.print(" (built on ");
          System.out.print(DateUtil.dateToISO8601String(
              ver.getBuildDate(),
              true, true, true, DateUtil.ACCURACY_SECONDS,
              DateUtil.UTC,
              new DateUtil.TrivialDateToISO8601CalendarFactory()));
          System.out.print(")");
        }
        System.out.println();
       
        if (ver.isGAECompliant() != null) {
            System.out.print("Google App Engine complian variant: ");
            System.out.println(ver.isGAECompliant().booleanValue() ? "Yes" : "No");
        }
       
        System.out.println();
        System.out.println("Copyright (c) 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky.");
        System.out.println("Licensed under the Apache License, Version 2.0");
View Full Code Here

  {
    freemarkerConfig = new Configuration();
    freemarkerConfig.setTemplateLoader(new SmartTemplateLoader(baseDirectory));
    freemarkerConfig.setDefaultEncoding("UTF-8");
    freemarkerConfig.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);
    freemarkerConfig.setIncompatibleImprovements(new Version(2, 3, 20));
   
    Properties properties = new Properties();
    properties.setProperty("mail.smtp.host", mailHost);
    properties.setProperty("mail.smtp.port", Integer.toString(port));
    properties.setProperty("mail.smtp.auth", authenticated.toString());
View Full Code Here

      
        this.cfg.setDirectoryForTemplateLoading(new File("templates/")); //$NON-NLS-1$
        this.cfg.setObjectWrapper(new DefaultObjectWrapper());
        this.cfg.setDefaultEncoding("UTF-8"); //$NON-NLS-1$
        this.cfg.setTemplateExceptionHandler(TemplateExceptionHandler.HTML_DEBUG_HANDLER);
        this.cfg.setIncompatibleImprovements(new Version(2, 3, 20));

        /* ----------------------------------------------------------------------- */   
    this.xStreamWeather = new XStream(new DomDriver());
    this.xStreamTimezone = new XStream(new DomDriver());
    //Set Aliases
View Full Code Here

            });

            config.setObjectWrapper(new DefaultObjectWrapper());
            config.setDefaultEncoding("UTF-8");
            config.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);
            config.setIncompatibleImprovements(new Version(2, 3, 20))// FreeMarker 2.3.20
            config.setLocalizedLookup(false);

            final Template template = config.getTemplate("templates/template.ftl");

            for (Type type : types) {
View Full Code Here

TOP

Related Classes of freemarker.template.Version

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.