Package org.commontemplate.engine

Examples of org.commontemplate.engine.Engine


  private void initCTL(ServletContextEvent event) {
    // 配置并建造引擎 (Engine是内同步线程安全的,可单例重用)
    try {
      ConfigurationSettings config = PropertiesConfigurationLoader
          .loadConfiguration("ctl.properties");
      Engine engine = new Engine(config);
      RestContextManager.setCTLEngine(engine);
    } catch (Exception e) {
      throw new RuntimeException("初始化CTL引擎失败", e);
    }
  }
View Full Code Here


  private void initCTL(ServletContextEvent event) {
    // 配置并建造引擎 (Engine是内同步线程安全的,可单例重用)
    try {
      ConfigurationSettings config = PropertiesConfigurationLoader
          .loadConfiguration("ctl.properties");
      Engine engine = new Engine(config);
      RestContextManager.setCTLEngine(engine);
    } catch (Exception e) {
      throw new RuntimeException("初始化CTL引擎失败", e);
    }
  }
View Full Code Here

    try {
      ServletContext servletContext = ActionServletContext.getContext().getServletContext();
          Properties properties = PropertiesUtils.getProperties(getPropertiesName());
          ConfigurationSettings config = PropertiesConfigurationLoader.loadConfiguration(properties, new ServletClassResourceLoader(servletContext), null);
          config.setSourceLoader(new ClasspathSourceLoader());
          engine = new Engine(config);
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      throw new RuntimeException(e.getMessage(), e);
    }
View Full Code Here

TOP

Related Classes of org.commontemplate.engine.Engine

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.