http://git-wip-us.apache.org/repos/asf/incubator-freemarker-site/blob/a4004324/builds/2.3.26-nightly/pgui_quickstart_all.html ---------------------------------------------------------------------- diff --git a/builds/2.3.26-nightly/pgui_quickstart_all.html b/builds/2.3.26-nightly/pgui_quickstart_all.html deleted file mode 100644 index 608bead..0000000 --- a/builds/2.3.26-nightly/pgui_quickstart_all.html +++ /dev/null @@ -1,142 +0,0 @@ -<!doctype html> -<!-- Generated by FreeMarker/Docgen from DocBook --> -<html lang="en" class="page-type-section"> -<head prefix="og: http://ogp.me/ns#"> -<meta charset="utf-8"> -<title>Putting all together - Apache FreeMarker Manual</title> -<meta http-equiv="X-UA-Compatible" content="IE=edge"> -<meta name="viewport" content="width=device-width,initial-scale=1"> -<meta name="format-detection" content="telephone=no"> -<meta property="og:site_name" content="Apache FreeMarker Manual"> -<meta property="og:title" content="Putting all together"> -<meta property="og:locale" content="en_US"> -<meta property="og:url" content="http://freemarker.org/docs/pgui_quickstart_all.html"> -<link rel="canonical" href="http://freemarker.org/docs/pgui_quickstart_all.html"> -<link rel="icon" href="favicon.png" type="image/png"> -<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Roboto:500,700,400,300|Droid+Sans+Mono"> -<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1489402528979"> -<script> -(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ -(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), -m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) -})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); -ga('create', 'UA-55420501-1', 'auto'); -ga('send', 'pageview'); -</script> -</head> -<body itemscope itemtype="https://schema.org/Code"> - <meta itemprop="url" content="http://freemarker.org/docs/"> - <meta itemprop="name" content="Apache FreeMarker Manual"> - - <!--[if lte IE 9]> - <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div> - <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://freemarker.org" role="banner"> <img itemprop="image" src="logo.png" alt="FreeMarker"> -</a><ul class="tabs"><li><a href="http://freemarker.org/">Home</a></li><li class="current"><a href="index.html">Manual</a></li><li><a class="external" href="api/index.html">Java API</a></li></ul><ul class="secondary-tabs"><li><a class="tab icon-heart" href="http://freemarker.org/contribute.html" title="Contribute"><span>Contribute</span></a></li><li><a class="tab icon-bug" href="https://issues.apache.org/jira/browse/FREEMARKER/" title="Report a Bug"><span>Report a Bug</span></a></li><li><a class="tab icon-download" href="http://freemarker.org/freemarkerdownload.html" title="Download"><span>Download</span></a></li></ul></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">Manual</a><div class="navigation-header"></div><form method="get" class="search-form" action="search-results.html"><fieldset><legend class="sr-only">Search form</legend><label for="search-field" class="sr-only">Search query</label><input id="searc h-field" name="q" type="search" class="search-input" placeholder="Search" spellcheck="false" autocorrect="off" autocomplete="off"><button type="submit" class="search-btn"><span class="sr-only">Search</span></button></fieldset></form></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">Apache FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer's Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_quickstart.html"><span itemprop="name">Getting Started</span></a></li><li class="step-3" item prop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_quickstart_all.html"><span itemprop="name">Putting all together</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Alpha. index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="dgui_template_exp.html#exp_cheatsheet">Expressions</a></li><li><a href="ref_builtins_alphaidx.html">?builtins</a></li><li><a href="ref_directive_alphaidx.html">#directives</a></li><li><a href="ref_specvar.html">.spec_vars</a></li><li><a href="app_faq.html">FAQ</a></li></ul></div></div></div> <div class="main-content site-width"> - <div class="content-wrapper"> - <div id="table-of-contents-wrapper" class="col-left"> - <script>var breadcrumb = ["Apache FreeMarker Manual","Programmer\'s Guide","Getting Started","Putting all together"];</script> - <script src="toc.js?1489402528979"></script> - <script src="docgen-resources/main.min.js?1489402528979"></script> - </div> -<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_quickstart_merge.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel.html"><span>Next</span></a></div><div class="title-wrapper"> -<h1 class="content-header header-section1" id="pgui_quickstart_all" itemprop="headline">Putting all together</h1> -</div></div><p>This is a working source file assembled from the previous - fragments. Don't forget to put <code class="inline-code">freemarker.jar</code> into - the <code class="inline-code">CLASSPATH</code>.</p> - -<div class="code-wrapper"><pre class="code-block code-unspecified">import freemarker.template.*; -import java.util.*; -import java.io.*; - -public class Test { - - public static void main(String[] args) throws Exception { - - /* ------------------------------------------------------------------------ */ - /* You should do this ONLY ONCE in the whole application life-cycle: */ - - /* Create and adjust the configuration singleton */ - Configuration cfg = new Configuration(Configuration.VERSION_2_3_25); - cfg.setDirectoryForTemplateLoading(new File("<em>/where/you/store/templates</em>")); - cfg.setDefaultEncoding("UTF-8"); - cfg.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER); - cfg.setLogTemplateExceptions(false); - - /* ------------------------------------------------------------------------ */ - /* You usually do these for MULTIPLE TIMES in the application life-cycle: */ - - /* Create a data-model */ - Map root = new HashMap(); - root.put("user", "Big Joe"); - Product latest = new Product(); - latest.setUrl("products/greenmouse.html"); - latest.setName("green mouse"); - root.put("latestProduct", latest); - - /* Get the template (uses cache internally) */ - Template temp = cfg.getTemplate("test.ftlh"); - - /* Merge data-model with template */ - Writer out = new OutputStreamWriter(System.out); - temp.process(root, out); - // Note: Depending on what `out` is, you may need to call `out.close()`. - // This is usually the case for file output, but not for servlet output. - } -}</pre></div> <div class="callout note"> - <strong class="callout-label">Note:</strong> - - <p>I have suppressed the exceptions for the sake of simplicity. - Don't do it in real products.</p> - </div> -<p>For the sake completeness, here's the the Product class used in - the data model:</p> - -<div class="code-wrapper"><pre class="code-block code-unspecified">/** - * Product bean; note that it must be a public class! - */ -public class Product { - - private String url; - private String name; - - // As per the JavaBeans spec., this defines the "url" bean property - // It must be public! - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - // As per the JavaBean spec., this defines the "name" bean property - // It must be public! - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - -}</pre></div><p>and the template:</p> - -<div class="code-wrapper"><pre class="code-block code-template"><html> -<head> - <title>Welcome!</title> -</head> -<body> - <h1>Welcome ${user}!</h1> - <p>Our latest product: - <a href="${latestProduct.url}">${latestProduct.name}</a>! -</body> -</html></pre></div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_quickstart_merge.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_datamodel.html"><span>Next</span></a></div></div></div></div> </div> - </div> -<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"><div class="column"><h3 class="column-header">Overview</h3><ul><li><a href="http://freemarker.org/">What is FreeMarker?</a></li><li><a href="http://freemarker.org/freemarkerdownload.html">Download</a></li><li><a href="app_versions.html">Version history</a></li><li><a href="http://freemarker.org/history.html">About us</a></li><li><a itemprop="license" href="app_license.html">License</a></li></ul></div><div class="column"><h3 class="column-header">Handy stuff</h3><ul><li><a href="http://freemarker-online.kenshoo.com/">Try template online</a></li><li><a href="dgui_template_exp.html#exp_cheatsheet">Expressions cheatsheet</a></li><li><a href="ref_directive_alphaidx.html">#directives</a></li><li><a href="ref_builtins_alphaidx.html">?built_ins</a></li><li><a href="ref_specvar.html">.special_vars</a></li></ul></div><div class="column"><h3 class="column-header">Community</h3><ul><li><a href ="https://github.com/freemarker/freemarker">FreeMarker on Github</a></li><li><a href="https://twitter.com/freemarker">Follow us on Twitter</a></li><li><a href="https://issues.apache.org/jira/browse/FREEMARKER/">Report a bug</a></li><li><a href="http://stackoverflow.com/questions/ask?tags=freemarker">Ask a question</a></li><li><a href="http://freemarker.org/mailing-lists.html">Mailing lists</a></li></ul></div></div><div class="col-right"><ul class="social-icons"><li><a class="github" href="https://github.com/freemarker/freemarker">Github</a></li><li><a class="twitter" href="https://twitter.com/freemarker">Twitter</a></li><li><a class="stack-overflow" href="http://stackoverflow.com/questions/ask?tags=freemarker">Stack Overflow</a></li></ul><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated"> -Last generated: -<time itemprop="dateModified" datetime="2017-03-13T10:55:28Z" title="Monday, March 13, 2017 10:55:28 AM GMT">2017-03-13 10:55:28 GMT</time>, for Freemarker 2.3.26 </p> -<p class="copyright"> -© <span itemprop="copyrightYear">1999</span>â2017 -<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="http://apache.org/">The Apache Software Foundation</a>. Apache FreeMarker, FreeMarker, Apache Incubator, Apache, the Apache FreeMarker logo are trademarks of The Apache Software Foundation. </p> -</div></div></div></body> -</html>
http://git-wip-us.apache.org/repos/asf/incubator-freemarker-site/blob/a4004324/builds/2.3.26-nightly/pgui_quickstart_createconfiguration.html ---------------------------------------------------------------------- diff --git a/builds/2.3.26-nightly/pgui_quickstart_createconfiguration.html b/builds/2.3.26-nightly/pgui_quickstart_createconfiguration.html deleted file mode 100644 index df95747..0000000 --- a/builds/2.3.26-nightly/pgui_quickstart_createconfiguration.html +++ /dev/null @@ -1,100 +0,0 @@ -<!doctype html> -<!-- Generated by FreeMarker/Docgen from DocBook --> -<html lang="en" class="page-type-section"> -<head prefix="og: http://ogp.me/ns#"> -<meta charset="utf-8"> -<title>Create a configuration instance - Apache FreeMarker Manual</title> -<meta http-equiv="X-UA-Compatible" content="IE=edge"> -<meta name="viewport" content="width=device-width,initial-scale=1"> -<meta name="format-detection" content="telephone=no"> -<meta property="og:site_name" content="Apache FreeMarker Manual"> -<meta property="og:title" content="Create a configuration instance"> -<meta property="og:locale" content="en_US"> -<meta property="og:url" content="http://freemarker.org/docs/pgui_quickstart_createconfiguration.html"> -<link rel="canonical" href="http://freemarker.org/docs/pgui_quickstart_createconfiguration.html"> -<link rel="icon" href="favicon.png" type="image/png"> -<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Roboto:500,700,400,300|Droid+Sans+Mono"> -<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1489402528979"> -<script> -(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ -(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), -m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) -})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); -ga('create', 'UA-55420501-1', 'auto'); -ga('send', 'pageview'); -</script> -</head> -<body itemscope itemtype="https://schema.org/Code"> - <meta itemprop="url" content="http://freemarker.org/docs/"> - <meta itemprop="name" content="Apache FreeMarker Manual"> - - <!--[if lte IE 9]> - <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div> - <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://freemarker.org" role="banner"> <img itemprop="image" src="logo.png" alt="FreeMarker"> -</a><ul class="tabs"><li><a href="http://freemarker.org/">Home</a></li><li class="current"><a href="index.html">Manual</a></li><li><a class="external" href="api/index.html">Java API</a></li></ul><ul class="secondary-tabs"><li><a class="tab icon-heart" href="http://freemarker.org/contribute.html" title="Contribute"><span>Contribute</span></a></li><li><a class="tab icon-bug" href="https://issues.apache.org/jira/browse/FREEMARKER/" title="Report a Bug"><span>Report a Bug</span></a></li><li><a class="tab icon-download" href="http://freemarker.org/freemarkerdownload.html" title="Download"><span>Download</span></a></li></ul></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">Manual</a><div class="navigation-header"></div><form method="get" class="search-form" action="search-results.html"><fieldset><legend class="sr-only">Search form</legend><label for="search-field" class="sr-only">Search query</label><input id="searc h-field" name="q" type="search" class="search-input" placeholder="Search" spellcheck="false" autocorrect="off" autocomplete="off"><button type="submit" class="search-btn"><span class="sr-only">Search</span></button></fieldset></form></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">Apache FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer's Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_quickstart.html"><span itemprop="name">Getting Started</span></a></li><li class="step-3" item prop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_quickstart_createconfiguration.html"><span itemprop="name">Create a configuration instance</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Alpha. index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="dgui_template_exp.html#exp_cheatsheet">Expressions</a></li><li><a href="ref_builtins_alphaidx.html">?builtins</a></li><li><a href="ref_directive_alphaidx.html">#directives</a></li><li><a href="ref_specvar.html">.spec_vars</a></li><li><a href="app_faq.html">FAQ</a></li></ul></div></div></div> <div class="main-content site-width"> - <div class="content-wrapper"> - <div id="table-of-contents-wrapper" class="col-left"> - <script>var breadcrumb = ["Apache FreeMarker Manual","Programmer\'s Guide","Getting Started","Create a configuration instance"];</script> - <script src="toc.js?1489402528979"></script> - <script src="docgen-resources/main.min.js?1489402528979"></script> - </div> -<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_quickstart.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_quickstart_createdatamodel.html"><span>Next</span></a></div><div class="title-wrapper"> -<h1 class="content-header header-section1" id="pgui_quickstart_createconfiguration" itemprop="headline">Create a configuration instance</h1> -</div></div><p>First you have to create a - <code class="inline-code">freemarker.template.Configuration</code> instance and - adjust its settings. A <code class="inline-code">Configuration</code> instance is - the central place to store the application level settings of - FreeMarker. Also, it deals with the creation and - <em>caching</em> of pre-parsed templates (i.e., - <code class="inline-code">Template</code> objects).</p><p>Normally you will <em>do this only once</em> at the - beginning of the application (possibly servlet) life-cycle:</p> - -<div class="code-wrapper"><pre class="code-block code-unspecified">// Create your Configuration instance, and specify if up to what FreeMarker -// version (here 2.3.25) do you want to apply the fixes that are not 100% -// backward-compatible. See the Configuration JavaDoc for details. -Configuration cfg = new Configuration(Configuration.VERSION_2_3_25); - -// Specify the source where the template files come from. Here I set a -// plain directory for it, but non-file-system sources are possible too: -cfg.setDirectoryForTemplateLoading(new File("<em>/where/you/store/templates</em>")); - -// Set the preferred charset template files are stored in. UTF-8 is -// a good choice in most applications: -cfg.setDefaultEncoding("UTF-8"); - -// Sets how errors will appear. -// During web page *development* TemplateExceptionHandler.HTML_DEBUG_HANDLER is better. -cfg.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER); - -// Don't log exceptions inside FreeMarker that it will thrown at you anyway: -cfg.setLogTemplateExceptions(false);</pre></div><p>From now you should use this <em>single</em> - configuration instance (i.e., its a singleton). Note however that if a - system has multiple independent components that use FreeMarker, then - of course they will use their own private - <code class="inline-code">Configuration</code> instances.</p> <div class="callout warning"> - <strong class="callout-label">Warning!</strong> - - <p>Do not needlessly re-create <code class="inline-code">Configuration</code> - instances; it's expensive, among others because you lose the - template cache. <code class="inline-code">Configuration</code> instances meant to - be application-level singletons.</p> - </div> -<p>In multi-threaded applications (like Web sites) the settings in - the <code class="inline-code">Configuration</code> instance must not be modified - anymore after this point. Thus it can be treated as "effectively - immutable" object, so you can continue with <em>safe - publishing</em> techniques (see JSR 133 and related literature) - to make the instance available for other threads. Like, publish the - instance through a final or volatile filed, or through a thread-safe - IoC container (like the one provided by Spring). - <code class="inline-code">Configuration</code> methods that don't deal with - modifying settings are thread-safe.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_quickstart.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_quickstart_createdatamodel.html"><span>Next</span></a></div></div></div></div> </div> - </div> -<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"><div class="column"><h3 class="column-header">Overview</h3><ul><li><a href="http://freemarker.org/">What is FreeMarker?</a></li><li><a href="http://freemarker.org/freemarkerdownload.html">Download</a></li><li><a href="app_versions.html">Version history</a></li><li><a href="http://freemarker.org/history.html">About us</a></li><li><a itemprop="license" href="app_license.html">License</a></li></ul></div><div class="column"><h3 class="column-header">Handy stuff</h3><ul><li><a href="http://freemarker-online.kenshoo.com/">Try template online</a></li><li><a href="dgui_template_exp.html#exp_cheatsheet">Expressions cheatsheet</a></li><li><a href="ref_directive_alphaidx.html">#directives</a></li><li><a href="ref_builtins_alphaidx.html">?built_ins</a></li><li><a href="ref_specvar.html">.special_vars</a></li></ul></div><div class="column"><h3 class="column-header">Community</h3><ul><li><a href ="https://github.com/freemarker/freemarker">FreeMarker on Github</a></li><li><a href="https://twitter.com/freemarker">Follow us on Twitter</a></li><li><a href="https://issues.apache.org/jira/browse/FREEMARKER/">Report a bug</a></li><li><a href="http://stackoverflow.com/questions/ask?tags=freemarker">Ask a question</a></li><li><a href="http://freemarker.org/mailing-lists.html">Mailing lists</a></li></ul></div></div><div class="col-right"><ul class="social-icons"><li><a class="github" href="https://github.com/freemarker/freemarker">Github</a></li><li><a class="twitter" href="https://twitter.com/freemarker">Twitter</a></li><li><a class="stack-overflow" href="http://stackoverflow.com/questions/ask?tags=freemarker">Stack Overflow</a></li></ul><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated"> -Last generated: -<time itemprop="dateModified" datetime="2017-03-13T10:55:28Z" title="Monday, March 13, 2017 10:55:28 AM GMT">2017-03-13 10:55:28 GMT</time>, for Freemarker 2.3.26 </p> -<p class="copyright"> -© <span itemprop="copyrightYear">1999</span>â2017 -<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="http://apache.org/">The Apache Software Foundation</a>. Apache FreeMarker, FreeMarker, Apache Incubator, Apache, the Apache FreeMarker logo are trademarks of The Apache Software Foundation. </p> -</div></div></div></body> -</html> http://git-wip-us.apache.org/repos/asf/incubator-freemarker-site/blob/a4004324/builds/2.3.26-nightly/pgui_quickstart_createdatamodel.html ---------------------------------------------------------------------- diff --git a/builds/2.3.26-nightly/pgui_quickstart_createdatamodel.html b/builds/2.3.26-nightly/pgui_quickstart_createdatamodel.html deleted file mode 100644 index 1aec301..0000000 --- a/builds/2.3.26-nightly/pgui_quickstart_createdatamodel.html +++ /dev/null @@ -1,170 +0,0 @@ -<!doctype html> -<!-- Generated by FreeMarker/Docgen from DocBook --> -<html lang="en" class="page-type-section"> -<head prefix="og: http://ogp.me/ns#"> -<meta charset="utf-8"> -<title>Create a data-model - Apache FreeMarker Manual</title> -<meta http-equiv="X-UA-Compatible" content="IE=edge"> -<meta name="viewport" content="width=device-width,initial-scale=1"> -<meta name="format-detection" content="telephone=no"> -<meta property="og:site_name" content="Apache FreeMarker Manual"> -<meta property="og:title" content="Create a data-model"> -<meta property="og:locale" content="en_US"> -<meta property="og:url" content="http://freemarker.org/docs/pgui_quickstart_createdatamodel.html"> -<link rel="canonical" href="http://freemarker.org/docs/pgui_quickstart_createdatamodel.html"> -<link rel="icon" href="favicon.png" type="image/png"> -<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Roboto:500,700,400,300|Droid+Sans+Mono"> -<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1489402528979"> -<script> -(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ -(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), -m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) -})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); -ga('create', 'UA-55420501-1', 'auto'); -ga('send', 'pageview'); -</script> -</head> -<body itemscope itemtype="https://schema.org/Code"> - <meta itemprop="url" content="http://freemarker.org/docs/"> - <meta itemprop="name" content="Apache FreeMarker Manual"> - - <!--[if lte IE 9]> - <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div> - <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://freemarker.org" role="banner"> <img itemprop="image" src="logo.png" alt="FreeMarker"> -</a><ul class="tabs"><li><a href="http://freemarker.org/">Home</a></li><li class="current"><a href="index.html">Manual</a></li><li><a class="external" href="api/index.html">Java API</a></li></ul><ul class="secondary-tabs"><li><a class="tab icon-heart" href="http://freemarker.org/contribute.html" title="Contribute"><span>Contribute</span></a></li><li><a class="tab icon-bug" href="https://issues.apache.org/jira/browse/FREEMARKER/" title="Report a Bug"><span>Report a Bug</span></a></li><li><a class="tab icon-download" href="http://freemarker.org/freemarkerdownload.html" title="Download"><span>Download</span></a></li></ul></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">Manual</a><div class="navigation-header"></div><form method="get" class="search-form" action="search-results.html"><fieldset><legend class="sr-only">Search form</legend><label for="search-field" class="sr-only">Search query</label><input id="searc h-field" name="q" type="search" class="search-input" placeholder="Search" spellcheck="false" autocorrect="off" autocomplete="off"><button type="submit" class="search-btn"><span class="sr-only">Search</span></button></fieldset></form></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">Apache FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer's Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_quickstart.html"><span itemprop="name">Getting Started</span></a></li><li class="step-3" item prop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_quickstart_createdatamodel.html"><span itemprop="name">Create a data-model</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Alpha. index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="dgui_template_exp.html#exp_cheatsheet">Expressions</a></li><li><a href="ref_builtins_alphaidx.html">?builtins</a></li><li><a href="ref_directive_alphaidx.html">#directives</a></li><li><a href="ref_specvar.html">.spec_vars</a></li><li><a href="app_faq.html">FAQ</a></li></ul></div></div></div> <div class="main-content site-width"> - <div class="content-wrapper"> - <div id="table-of-contents-wrapper" class="col-left"> - <script>var breadcrumb = ["Apache FreeMarker Manual","Programmer\'s Guide","Getting Started","Create a data-model"];</script> - <script src="toc.js?1489402528979"></script> - <script src="docgen-resources/main.min.js?1489402528979"></script> - </div> -<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_quickstart_createconfiguration.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_quickstart_gettemplate.html"><span>Next</span></a></div><div class="title-wrapper"> -<h1 class="content-header header-section1" id="pgui_quickstart_createdatamodel" itemprop="headline">Create a data-model</h1> -</div></div><p>In simple cases you can build data-models using - <code class="inline-code">java.lang</code> and <code class="inline-code">java.util</code> classes - and custom JavaBeans:</p><ul> - <li> - <p>Use <code class="inline-code">java.lang.String</code> for strings.</p> - </li> - - <li> - <p>Use <code class="inline-code">java.lang.Number</code> subclasses for - numbers.</p> - </li> - - <li> - <p>Use <code class="inline-code">java.lang.Boolean</code> for boolean - values.</p> - </li> - - <li> - <p>Use <code class="inline-code">java.util.Date</code> and its subclasses for - date/time values</p> - </li> - - <li> - <p>Use <code class="inline-code">java.util.List</code> or Java arrays for - sequences.</p> - </li> - - <li> - <p>Use <code class="inline-code">java.util.Map</code> with - <code class="inline-code">String</code> keys for hashes.</p> - </li> - - <li> - <p>Use your custom bean class for hashes where the items - correspond to the bean properties. For example the - <code class="inline-code">price</code> property (<code class="inline-code">getPrice()</code>) - of <code class="inline-code">product</code> can be get as - <code class="inline-code">product.price</code>. (The actions of the beans can be - exposed as well; see much later <a href="pgui_misc_beanwrapper.html">here</a>)</p> - </li> - </ul><p>For example, let's build the data-model of the <a href="dgui_quickstart_basics.html#example.first">first example of the Template Author's - Guide</a>. For convenience, here it is again:</p> - -<div class="code-wrapper"><pre class="code-block code-data-model">(root) - | - +- user = "Big Joe" - | - +- latestProduct - | - +- url = "products/greenmouse.html" - | - +- name = "green mouse"</pre></div><p>This Java code fragment that builds this data-model:</p> - -<div class="code-wrapper"><pre class="code-block code-unspecified">// Create the root hash. We use a Map here, but it could be a JavaBean too. -Map<String, Object> root = new HashMap<>(); - -// Put string "user" into the root -root.put("user", "Big Joe"); - -// Create the "latestProduct" hash. We use a JavaBean here, but it could be a Map too. -Product latest = new Product(); -latest.setUrl("products/greenmouse.html"); -latest.setName("green mouse"); -// and put it into the root -root.put("latestProduct", latest);</pre></div><p>As demonstrated above, for hashes (something that stores other - named items) you can use either a <code class="inline-code">Map</code> or any kind - of public class that has public - <code class="inline-code">get<em class="code-color">Xxx</em></code>/<code class="inline-code">is<em class="code-color">Xxx</em></code> - methods as prescribed by the JavaBeans specification. Like the above - <code class="inline-code">Product</code> class could be something like:</p> - -<div class="code-wrapper"><pre class="code-block code-unspecified">/** - * Product bean; note that it must be a public class! - */ -public class Product { - - private String url; - private String name; - - // As per the JavaBeans spec., this defines the "url" bean property - // It must be public! - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - // As per the JavaBean spec., this defines the "name" bean property - // It must be public! - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - -}</pre></div><p>Regardless if <code class="inline-code">latestProduct</code> is a - <code class="inline-code">Map</code> that contains the <code class="inline-code">"name"</code> and - <code class="inline-code">"url"</code> keys, or it's a JavaBean as shown above, in - the template you can use <code class="inline-code">${latestProduct.name}</code>. The - root itself need not be a <code class="inline-code">Map</code> either; it could be - an object with <code class="inline-code">getUser()</code> and - <code class="inline-code">getLastestProduct()</code> methods too.</p> <div class="callout note"> - <strong class="callout-label">Note:</strong> - - <p>The behavior described here only stands if the value of the - <code class="inline-code">object_wrapper</code> configuration setting is something - that's used in almost all real world setups anyway. Anything that - the <code class="inline-code">ObjectWrapper</code> wraps to be a hash (something - that implements the <code class="inline-code">TemplateHashModel</code> interface) - can be used as the root, and can be traversed in templates with the - dot and <code class="inline-code">[]</code> operators. Something that it doesn't - wrap to be a hash can't be used as the root or be traversed like - that.</p> - </div> -<div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_quickstart_createconfiguration.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_quickstart_gettemplate.html"><span>Next</span></a></div></div></div></div> </div> - </div> -<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"><div class="column"><h3 class="column-header">Overview</h3><ul><li><a href="http://freemarker.org/">What is FreeMarker?</a></li><li><a href="http://freemarker.org/freemarkerdownload.html">Download</a></li><li><a href="app_versions.html">Version history</a></li><li><a href="http://freemarker.org/history.html">About us</a></li><li><a itemprop="license" href="app_license.html">License</a></li></ul></div><div class="column"><h3 class="column-header">Handy stuff</h3><ul><li><a href="http://freemarker-online.kenshoo.com/">Try template online</a></li><li><a href="dgui_template_exp.html#exp_cheatsheet">Expressions cheatsheet</a></li><li><a href="ref_directive_alphaidx.html">#directives</a></li><li><a href="ref_builtins_alphaidx.html">?built_ins</a></li><li><a href="ref_specvar.html">.special_vars</a></li></ul></div><div class="column"><h3 class="column-header">Community</h3><ul><li><a href ="https://github.com/freemarker/freemarker">FreeMarker on Github</a></li><li><a href="https://twitter.com/freemarker">Follow us on Twitter</a></li><li><a href="https://issues.apache.org/jira/browse/FREEMARKER/">Report a bug</a></li><li><a href="http://stackoverflow.com/questions/ask?tags=freemarker">Ask a question</a></li><li><a href="http://freemarker.org/mailing-lists.html">Mailing lists</a></li></ul></div></div><div class="col-right"><ul class="social-icons"><li><a class="github" href="https://github.com/freemarker/freemarker">Github</a></li><li><a class="twitter" href="https://twitter.com/freemarker">Twitter</a></li><li><a class="stack-overflow" href="http://stackoverflow.com/questions/ask?tags=freemarker">Stack Overflow</a></li></ul><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated"> -Last generated: -<time itemprop="dateModified" datetime="2017-03-13T10:55:28Z" title="Monday, March 13, 2017 10:55:28 AM GMT">2017-03-13 10:55:28 GMT</time>, for Freemarker 2.3.26 </p> -<p class="copyright"> -© <span itemprop="copyrightYear">1999</span>â2017 -<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="http://apache.org/">The Apache Software Foundation</a>. Apache FreeMarker, FreeMarker, Apache Incubator, Apache, the Apache FreeMarker logo are trademarks of The Apache Software Foundation. </p> -</div></div></div></body> -</html> http://git-wip-us.apache.org/repos/asf/incubator-freemarker-site/blob/a4004324/builds/2.3.26-nightly/pgui_quickstart_gettemplate.html ---------------------------------------------------------------------- diff --git a/builds/2.3.26-nightly/pgui_quickstart_gettemplate.html b/builds/2.3.26-nightly/pgui_quickstart_gettemplate.html deleted file mode 100644 index 5f8846d..0000000 --- a/builds/2.3.26-nightly/pgui_quickstart_gettemplate.html +++ /dev/null @@ -1,70 +0,0 @@ -<!doctype html> -<!-- Generated by FreeMarker/Docgen from DocBook --> -<html lang="en" class="page-type-section"> -<head prefix="og: http://ogp.me/ns#"> -<meta charset="utf-8"> -<title>Get the template - Apache FreeMarker Manual</title> -<meta http-equiv="X-UA-Compatible" content="IE=edge"> -<meta name="viewport" content="width=device-width,initial-scale=1"> -<meta name="format-detection" content="telephone=no"> -<meta property="og:site_name" content="Apache FreeMarker Manual"> -<meta property="og:title" content="Get the template"> -<meta property="og:locale" content="en_US"> -<meta property="og:url" content="http://freemarker.org/docs/pgui_quickstart_gettemplate.html"> -<link rel="canonical" href="http://freemarker.org/docs/pgui_quickstart_gettemplate.html"> -<link rel="icon" href="favicon.png" type="image/png"> -<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Roboto:500,700,400,300|Droid+Sans+Mono"> -<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1489402528979"> -<script> -(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ -(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), -m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) -})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); -ga('create', 'UA-55420501-1', 'auto'); -ga('send', 'pageview'); -</script> -</head> -<body itemscope itemtype="https://schema.org/Code"> - <meta itemprop="url" content="http://freemarker.org/docs/"> - <meta itemprop="name" content="Apache FreeMarker Manual"> - - <!--[if lte IE 9]> - <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div> - <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://freemarker.org" role="banner"> <img itemprop="image" src="logo.png" alt="FreeMarker"> -</a><ul class="tabs"><li><a href="http://freemarker.org/">Home</a></li><li class="current"><a href="index.html">Manual</a></li><li><a class="external" href="api/index.html">Java API</a></li></ul><ul class="secondary-tabs"><li><a class="tab icon-heart" href="http://freemarker.org/contribute.html" title="Contribute"><span>Contribute</span></a></li><li><a class="tab icon-bug" href="https://issues.apache.org/jira/browse/FREEMARKER/" title="Report a Bug"><span>Report a Bug</span></a></li><li><a class="tab icon-download" href="http://freemarker.org/freemarkerdownload.html" title="Download"><span>Download</span></a></li></ul></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">Manual</a><div class="navigation-header"></div><form method="get" class="search-form" action="search-results.html"><fieldset><legend class="sr-only">Search form</legend><label for="search-field" class="sr-only">Search query</label><input id="searc h-field" name="q" type="search" class="search-input" placeholder="Search" spellcheck="false" autocorrect="off" autocomplete="off"><button type="submit" class="search-btn"><span class="sr-only">Search</span></button></fieldset></form></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">Apache FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer's Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_quickstart.html"><span itemprop="name">Getting Started</span></a></li><li class="step-3" item prop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_quickstart_gettemplate.html"><span itemprop="name">Get the template</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Alpha. index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="dgui_template_exp.html#exp_cheatsheet">Expressions</a></li><li><a href="ref_builtins_alphaidx.html">?builtins</a></li><li><a href="ref_directive_alphaidx.html">#directives</a></li><li><a href="ref_specvar.html">.spec_vars</a></li><li><a href="app_faq.html">FAQ</a></li></ul></div></div></div> <div class="main-content site-width"> - <div class="content-wrapper"> - <div id="table-of-contents-wrapper" class="col-left"> - <script>var breadcrumb = ["Apache FreeMarker Manual","Programmer\'s Guide","Getting Started","Get the template"];</script> - <script src="toc.js?1489402528979"></script> - <script src="docgen-resources/main.min.js?1489402528979"></script> - </div> -<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_quickstart_createdatamodel.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_quickstart_merge.html"><span>Next</span></a></div><div class="title-wrapper"> -<h1 class="content-header header-section1" id="pgui_quickstart_gettemplate" itemprop="headline">Get the template</h1> -</div></div><p>Templates are represented by - <code class="inline-code">freemarker.template.Template</code> instances. Typically - you obtain a <code class="inline-code">Template</code> instance from the - <code class="inline-code">Configuration</code> instance, using its. - <code class="inline-code">getTemplate</code> method. If you store <a href="dgui_quickstart_basics.html#example.first">the example template</a> in the - <code class="inline-code">test.ftlh</code> file of the <a href="pgui_quickstart_createconfiguration.html">earlier</a> set - directory, then you can do this:</p> - -<div class="code-wrapper"><pre class="code-block code-unspecified">Template temp = cfg.getTemplate("test.ftlh");</pre></div><p>This gives you a <code class="inline-code">Template</code> instance that was - created by reading - <code class="inline-code"><em class="code-color">/where/you/store/templates/</em>test.ftlh</code> - and parsing it. The <code class="inline-code">Template</code> instance stores the - template in parsed form, and not as text. If the template is missing - or syntactically incorrect, <code class="inline-code">getTemplate</code> will throw - exception instead.</p><p><code class="inline-code">Configuration</code> caches - <code class="inline-code">Template</code> instances, so when you call - <code class="inline-code">cfg.getTemplate("test.ftlh")</code> next time, it probably - won't read and parse the template file again, just returns the same - <code class="inline-code">Template</code> instance as for the first time.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_quickstart_createdatamodel.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_quickstart_merge.html"><span>Next</span></a></div></div></div></div> </div> - </div> -<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"><div class="column"><h3 class="column-header">Overview</h3><ul><li><a href="http://freemarker.org/">What is FreeMarker?</a></li><li><a href="http://freemarker.org/freemarkerdownload.html">Download</a></li><li><a href="app_versions.html">Version history</a></li><li><a href="http://freemarker.org/history.html">About us</a></li><li><a itemprop="license" href="app_license.html">License</a></li></ul></div><div class="column"><h3 class="column-header">Handy stuff</h3><ul><li><a href="http://freemarker-online.kenshoo.com/">Try template online</a></li><li><a href="dgui_template_exp.html#exp_cheatsheet">Expressions cheatsheet</a></li><li><a href="ref_directive_alphaidx.html">#directives</a></li><li><a href="ref_builtins_alphaidx.html">?built_ins</a></li><li><a href="ref_specvar.html">.special_vars</a></li></ul></div><div class="column"><h3 class="column-header">Community</h3><ul><li><a href ="https://github.com/freemarker/freemarker">FreeMarker on Github</a></li><li><a href="https://twitter.com/freemarker">Follow us on Twitter</a></li><li><a href="https://issues.apache.org/jira/browse/FREEMARKER/">Report a bug</a></li><li><a href="http://stackoverflow.com/questions/ask?tags=freemarker">Ask a question</a></li><li><a href="http://freemarker.org/mailing-lists.html">Mailing lists</a></li></ul></div></div><div class="col-right"><ul class="social-icons"><li><a class="github" href="https://github.com/freemarker/freemarker">Github</a></li><li><a class="twitter" href="https://twitter.com/freemarker">Twitter</a></li><li><a class="stack-overflow" href="http://stackoverflow.com/questions/ask?tags=freemarker">Stack Overflow</a></li></ul><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated"> -Last generated: -<time itemprop="dateModified" datetime="2017-03-13T10:55:28Z" title="Monday, March 13, 2017 10:55:28 AM GMT">2017-03-13 10:55:28 GMT</time>, for Freemarker 2.3.26 </p> -<p class="copyright"> -© <span itemprop="copyrightYear">1999</span>â2017 -<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="http://apache.org/">The Apache Software Foundation</a>. Apache FreeMarker, FreeMarker, Apache Incubator, Apache, the Apache FreeMarker logo are trademarks of The Apache Software Foundation. </p> -</div></div></div></body> -</html> http://git-wip-us.apache.org/repos/asf/incubator-freemarker-site/blob/a4004324/builds/2.3.26-nightly/pgui_quickstart_merge.html ---------------------------------------------------------------------- diff --git a/builds/2.3.26-nightly/pgui_quickstart_merge.html b/builds/2.3.26-nightly/pgui_quickstart_merge.html deleted file mode 100644 index c295aa2..0000000 --- a/builds/2.3.26-nightly/pgui_quickstart_merge.html +++ /dev/null @@ -1,78 +0,0 @@ -<!doctype html> -<!-- Generated by FreeMarker/Docgen from DocBook --> -<html lang="en" class="page-type-section"> -<head prefix="og: http://ogp.me/ns#"> -<meta charset="utf-8"> -<title>Merging the template with the data-model - Apache FreeMarker Manual</title> -<meta http-equiv="X-UA-Compatible" content="IE=edge"> -<meta name="viewport" content="width=device-width,initial-scale=1"> -<meta name="format-detection" content="telephone=no"> -<meta property="og:site_name" content="Apache FreeMarker Manual"> -<meta property="og:title" content="Merging the template with the data-model"> -<meta property="og:locale" content="en_US"> -<meta property="og:url" content="http://freemarker.org/docs/pgui_quickstart_merge.html"> -<link rel="canonical" href="http://freemarker.org/docs/pgui_quickstart_merge.html"> -<link rel="icon" href="favicon.png" type="image/png"> -<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Roboto:500,700,400,300|Droid+Sans+Mono"> -<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1489402528979"> -<script> -(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ -(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), -m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) -})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); -ga('create', 'UA-55420501-1', 'auto'); -ga('send', 'pageview'); -</script> -</head> -<body itemscope itemtype="https://schema.org/Code"> - <meta itemprop="url" content="http://freemarker.org/docs/"> - <meta itemprop="name" content="Apache FreeMarker Manual"> - - <!--[if lte IE 9]> - <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div> - <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://freemarker.org" role="banner"> <img itemprop="image" src="logo.png" alt="FreeMarker"> -</a><ul class="tabs"><li><a href="http://freemarker.org/">Home</a></li><li class="current"><a href="index.html">Manual</a></li><li><a class="external" href="api/index.html">Java API</a></li></ul><ul class="secondary-tabs"><li><a class="tab icon-heart" href="http://freemarker.org/contribute.html" title="Contribute"><span>Contribute</span></a></li><li><a class="tab icon-bug" href="https://issues.apache.org/jira/browse/FREEMARKER/" title="Report a Bug"><span>Report a Bug</span></a></li><li><a class="tab icon-download" href="http://freemarker.org/freemarkerdownload.html" title="Download"><span>Download</span></a></li></ul></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">Manual</a><div class="navigation-header"></div><form method="get" class="search-form" action="search-results.html"><fieldset><legend class="sr-only">Search form</legend><label for="search-field" class="sr-only">Search query</label><input id="searc h-field" name="q" type="search" class="search-input" placeholder="Search" spellcheck="false" autocorrect="off" autocomplete="off"><button type="submit" class="search-btn"><span class="sr-only">Search</span></button></fieldset></form></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">Apache FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui.html"><span itemprop="name">Programmer's Guide</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_quickstart.html"><span itemprop="name">Getting Started</span></a></li><li class="step-3" item prop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="pgui_quickstart_merge.html"><span itemprop="name">Merging the template with the data-model</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Alpha. index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="dgui_template_exp.html#exp_cheatsheet">Expressions</a></li><li><a href="ref_builtins_alphaidx.html">?builtins</a></li><li><a href="ref_directive_alphaidx.html">#directives</a></li><li><a href="ref_specvar.html">.spec_vars</a></li><li><a href="app_faq.html">FAQ</a></li></ul></div></div></div> <div class="main-content site-width"> - <div class="content-wrapper"> - <div id="table-of-contents-wrapper" class="col-left"> - <script>var breadcrumb = ["Apache FreeMarker Manual","Programmer\'s Guide","Getting Started","Merging the template with the data-model"];</script> - <script src="toc.js?1489402528979"></script> - <script src="docgen-resources/main.min.js?1489402528979"></script> - </div> -<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_quickstart_gettemplate.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_quickstart_all.html"><span>Next</span></a></div><div class="title-wrapper"> -<h1 class="content-header header-section1" id="pgui_quickstart_merge" itemprop="headline">Merging the template with the data-model</h1> -</div></div><p>As you might already know, data-model + template = output. We - already have a data-model (<code class="inline-code">root</code>) and a template - (<code class="inline-code">temp</code>), so to get the output we have to merge them. - This is done by the <code class="inline-code">process</code> method of the template. - It takes the data-model root and a <code class="inline-code">Writer</code> as - parameters. It writes the produced output to the - <code class="inline-code">Writer</code>. For the sake of simplicity here I write to - the standard output:</p> - -<div class="code-wrapper"><pre class="code-block code-unspecified">Writer out = new OutputStreamWriter(System.out); -temp.process(root, out);</pre></div><p>This will print to your terminal the output you have seen in the - <a href="dgui_quickstart_basics.html#example.first">first example</a> of the Template - Author's Guide.</p><p>Java I/O related notes: Depending on what <code class="inline-code">out</code> - is, you may need to ensure that <code class="inline-code">out.close()</code> is - called. This is typically needed when <code class="inline-code">out</code> writes - into a file that was opened to store the output of the template. In - other times, like in typical Web applications, you must - <em>not</em> close <code class="inline-code">out</code>. FreeMarker - calls <code class="inline-code">out.flush()</code> after a successful template - execution (but tis can be disabled in - <code class="inline-code">Configuration</code>), so you don't need to worry about - that.</p><p>Note that once you have obtained a <code class="inline-code">Template</code> - instance, you can merge it with different data-models for unlimited - times (<code class="inline-code">Template</code> instances are stateless). Also, the - <code class="inline-code">test.ftlh</code> file is accessed only while the - <code class="inline-code">Template</code> instance is created, not when you call the - process method.</p><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_quickstart_gettemplate.html"><span>Previous</span></a><a class="paging-arrow next" href="pgui_quickstart_all.html"><span>Next</span></a></div></div></div></div> </div> - </div> -<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"><div class="column"><h3 class="column-header">Overview</h3><ul><li><a href="http://freemarker.org/">What is FreeMarker?</a></li><li><a href="http://freemarker.org/freemarkerdownload.html">Download</a></li><li><a href="app_versions.html">Version history</a></li><li><a href="http://freemarker.org/history.html">About us</a></li><li><a itemprop="license" href="app_license.html">License</a></li></ul></div><div class="column"><h3 class="column-header">Handy stuff</h3><ul><li><a href="http://freemarker-online.kenshoo.com/">Try template online</a></li><li><a href="dgui_template_exp.html#exp_cheatsheet">Expressions cheatsheet</a></li><li><a href="ref_directive_alphaidx.html">#directives</a></li><li><a href="ref_builtins_alphaidx.html">?built_ins</a></li><li><a href="ref_specvar.html">.special_vars</a></li></ul></div><div class="column"><h3 class="column-header">Community</h3><ul><li><a href ="https://github.com/freemarker/freemarker">FreeMarker on Github</a></li><li><a href="https://twitter.com/freemarker">Follow us on Twitter</a></li><li><a href="https://issues.apache.org/jira/browse/FREEMARKER/">Report a bug</a></li><li><a href="http://stackoverflow.com/questions/ask?tags=freemarker">Ask a question</a></li><li><a href="http://freemarker.org/mailing-lists.html">Mailing lists</a></li></ul></div></div><div class="col-right"><ul class="social-icons"><li><a class="github" href="https://github.com/freemarker/freemarker">Github</a></li><li><a class="twitter" href="https://twitter.com/freemarker">Twitter</a></li><li><a class="stack-overflow" href="http://stackoverflow.com/questions/ask?tags=freemarker">Stack Overflow</a></li></ul><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated"> -Last generated: -<time itemprop="dateModified" datetime="2017-03-13T10:55:28Z" title="Monday, March 13, 2017 10:55:28 AM GMT">2017-03-13 10:55:28 GMT</time>, for Freemarker 2.3.26 </p> -<p class="copyright"> -© <span itemprop="copyrightYear">1999</span>â2017 -<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="http://apache.org/">The Apache Software Foundation</a>. Apache FreeMarker, FreeMarker, Apache Incubator, Apache, the Apache FreeMarker logo are trademarks of The Apache Software Foundation. </p> -</div></div></div></body> -</html> http://git-wip-us.apache.org/repos/asf/incubator-freemarker-site/blob/a4004324/builds/2.3.26-nightly/ref.html ---------------------------------------------------------------------- diff --git a/builds/2.3.26-nightly/ref.html b/builds/2.3.26-nightly/ref.html deleted file mode 100644 index 56c7c78..0000000 --- a/builds/2.3.26-nightly/ref.html +++ /dev/null @@ -1,54 +0,0 @@ -<!doctype html> -<!-- Generated by FreeMarker/Docgen from DocBook --> -<html lang="en" class="page-type-part"> -<head prefix="og: http://ogp.me/ns#"> -<meta charset="utf-8"> -<title>Template Language Reference - Apache FreeMarker Manual</title> -<meta http-equiv="X-UA-Compatible" content="IE=edge"> -<meta name="viewport" content="width=device-width,initial-scale=1"> -<meta name="format-detection" content="telephone=no"> -<meta property="og:site_name" content="Apache FreeMarker Manual"> -<meta property="og:title" content="Template Language Reference"> -<meta property="og:locale" content="en_US"> -<meta property="og:url" content="http://freemarker.org/docs/ref.html"> -<link rel="canonical" href="http://freemarker.org/docs/ref.html"> -<link rel="icon" href="favicon.png" type="image/png"> -<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Roboto:500,700,400,300|Droid+Sans+Mono"> -<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1489402528979"> -<script> -(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ -(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), -m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) -})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); -ga('create', 'UA-55420501-1', 'auto'); -ga('send', 'pageview'); -</script> -</head> -<body itemscope itemtype="https://schema.org/Code"> - <meta itemprop="url" content="http://freemarker.org/docs/"> - <meta itemprop="name" content="Apache FreeMarker Manual"> - - <!--[if lte IE 9]> - <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div> - <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://freemarker.org" role="banner"> <img itemprop="image" src="logo.png" alt="FreeMarker"> -</a><ul class="tabs"><li><a href="http://freemarker.org/">Home</a></li><li class="current"><a href="index.html">Manual</a></li><li><a class="external" href="api/index.html">Java API</a></li></ul><ul class="secondary-tabs"><li><a class="tab icon-heart" href="http://freemarker.org/contribute.html" title="Contribute"><span>Contribute</span></a></li><li><a class="tab icon-bug" href="https://issues.apache.org/jira/browse/FREEMARKER/" title="Report a Bug"><span>Report a Bug</span></a></li><li><a class="tab icon-download" href="http://freemarker.org/freemarkerdownload.html" title="Download"><span>Download</span></a></li></ul></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">Manual</a><div class="navigation-header"></div><form method="get" class="search-form" action="search-results.html"><fieldset><legend class="sr-only">Search form</legend><label for="search-field" class="sr-only">Search query</label><input id="searc h-field" name="q" type="search" class="search-input" placeholder="Search" spellcheck="false" autocorrect="off" autocomplete="off"><button type="submit" class="search-btn"><span class="sr-only">Search</span></button></fieldset></form></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">Apache FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Template Language Reference</span></a></li></ul><div class="bookmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Alpha. index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="dgui_templat e_exp.html#exp_cheatsheet">Expressions</a></li><li><a href="ref_builtins_alphaidx.html">?builtins</a></li><li><a href="ref_directive_alphaidx.html">#directives</a></li><li><a href="ref_specvar.html">.spec_vars</a></li><li><a href="app_faq.html">FAQ</a></li></ul></div></div></div> <div class="main-content site-width"> - <div class="content-wrapper"> - <div id="table-of-contents-wrapper" class="col-left"> - <script>var breadcrumb = ["Apache FreeMarker Manual","Template Language Reference"];</script> - <script src="toc.js?1489402528979"></script> - <script src="docgen-resources/main.min.js?1489402528979"></script> - </div> -<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="pgui_misc_jythonwrapper.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins.html"><span>Next</span></a></div><div class="title-wrapper"> -<h1 class="content-header header-part" id="ref" itemprop="headline">Template Language Reference</h1> -</div></div><div class="page-menu"> -<div class="page-menu-title">Section Contents</div> -<ul><li><a class="page-menu-link" href="ref_builtins.html" data-menu-target="ref_builtins">Built-in Reference</a><ul><li><a class="page-menu-link" href="ref_builtins_alphaidx.html" data-menu-target="ref_builtins_alphaidx">Alphabetical index</a></li><li><a class="page-menu-link" href="ref_builtins_string.html" data-menu-target="ref_builtins_string">Built-ins for strings</a></li><li><a class="page-menu-link" href="ref_builtins_number.html" data-menu-target="ref_builtins_number">Built-ins for numbers</a></li><li><a class="page-menu-link" href="ref_builtins_date.html" data-menu-target="ref_builtins_date">Built-ins for date/time/date-time values</a></li><li><a class="page-menu-link" href="ref_builtins_boolean.html" data-menu-target="ref_builtins_boolean">Built-ins for booleans</a></li><li><a class="page-menu-link" href="ref_builtins_sequence.html" data-menu-target="ref_builtins_sequence">Built-ins for sequences</a></li><li><a class="page-menu-link" href="ref_builtins_hash.html" data-menu -target="ref_builtins_hash">Built-ins for hashes</a></li><li><a class="page-menu-link" href="ref_builtins_node.html" data-menu-target="ref_builtins_node">Built-ins for nodes (for XML)</a></li><li><a class="page-menu-link" href="ref_builtins_loop_var.html" data-menu-target="ref_builtins_loop_var">Loop variable built-ins</a></li><li><a class="page-menu-link" href="ref_builtins_type_independent.html" data-menu-target="ref_builtins_type_independent">Type independent built-ins</a></li><li><a class="page-menu-link" href="ref_builtins_expert.html" data-menu-target="ref_builtins_expert">Seldom used and expert built-ins</a></li></ul></li><li><a class="page-menu-link" href="ref_directives.html" data-menu-target="ref_directives">Directive Reference</a><ul><li><a class="page-menu-link" href="ref_directive_alphaidx.html" data-menu-target="ref_directive_alphaidx">Alphabetical index</a></li><li><a class="page-menu-link" href="ref_directive_assign.html" data-menu-target="ref_directive_assign">assig n</a></li><li><a class="page-menu-link" href="ref_directive_attempt.html" data-menu-target="ref_directive_attempt">attempt, recover</a></li><li><a class="page-menu-link" href="ref_directive_autoesc.html" data-menu-target="ref_directive_autoesc">autoesc</a></li><li><a class="page-menu-link" href="ref_directive_compress.html" data-menu-target="ref_directive_compress">compress</a></li><li><a class="page-menu-link" href="ref_directive_escape.html" data-menu-target="ref_directive_escape">escape, noescape (deprecated)</a></li><li><a class="page-menu-link" href="ref_directive_flush.html" data-menu-target="ref_directive_flush">flush</a></li><li><a class="page-menu-link" href="ref_directive_ftl.html" data-menu-target="ref_directive_ftl">ftl</a></li><li><a class="page-menu-link" href="ref_directive_function.html" data-menu-target="ref_directive_function">function, return</a></li><li><a class="page-menu-link" href="ref_directive_global.html" data-menu-target="ref_directive_global">global</a></ li><li><a class="page-menu-link" href="ref_directive_if.html" data-menu-target="ref_directive_if">if, else, elseif</a></li><li><a class="page-menu-link" href="ref_directive_import.html" data-menu-target="ref_directive_import">import</a></li><li><a class="page-menu-link" href="ref_directive_include.html" data-menu-target="ref_directive_include">include</a></li><li><a class="page-menu-link" href="ref_directive_list.html" data-menu-target="ref_directive_list">list, else, items, sep, break</a></li><li><a class="page-menu-link" href="ref_directive_local.html" data-menu-target="ref_directive_local">local</a></li><li><a class="page-menu-link" href="ref_directive_macro.html" data-menu-target="ref_directive_macro">macro, nested, return</a></li><li><a class="page-menu-link" href="ref_directive_noautoesc.html" data-menu-target="ref_directive_noautoesc">noautoesc</a></li><li><a class="page-menu-link" href="ref_directive_noparse.html" data-menu-target="ref_directive_noparse">noparse</a></li><li> <a class="page-menu-link" href="ref_directive_nt.html" data-menu-target="ref_directive_nt">nt</a></li><li><a class="page-menu-link" href="ref_directive_outputformat.html" data-menu-target="ref_directive_outputformat">outputformat</a></li><li><a class="page-menu-link" href="ref_directive_setting.html" data-menu-target="ref_directive_setting">setting</a></li><li><a class="page-menu-link" href="ref_directive_stop.html" data-menu-target="ref_directive_stop">stop</a></li><li><a class="page-menu-link" href="ref_directive_switch.html" data-menu-target="ref_directive_switch">switch, case, default, break</a></li><li><a class="page-menu-link" href="ref_directive_t.html" data-menu-target="ref_directive_t">t, lt, rt</a></li><li><a class="page-menu-link" href="ref_directive_userDefined.html" data-menu-target="ref_directive_userDefined">User-defined directive (<@...>)</a></li><li><a class="page-menu-link" href="ref_directive_visit.html" data-menu-target="ref_directive_visit">visit, recurse, fallback</a></li></ul></li><li><a class="page-menu-link" href="ref_specvar.html" data-menu-target="ref_specvar">Special Variable Reference</a></li><li><a class="page-menu-link" href="ref_reservednames.html" data-menu-target="ref_reservednames">Reserved names in FTL</a></li><li><a class="page-menu-link" href="ref_deprecated.html" data-menu-target="ref_deprecated">Deprecated FTL constructs</a><ul><li><a class="page-menu-link" href="ref_depr_directive.html" data-menu-target="ref_depr_directive">List of deprecated directives</a></li><li><a class="page-menu-link" href="ref_depr_builtin.html" data-menu-target="ref_depr_builtin">List of deprecated built-ins</a></li><li><a class="page-menu-link" href="ref_depr_oldmacro.html" data-menu-target="ref_depr_oldmacro">Old-style macro and call directives</a></li><li><a class="page-menu-link" href="ref_depr_transform.html" data-menu-target="ref_depr_transform">Transform directive</a></li><li><a class="page-menu-link" href="ref_depr_oldsyntax.html" data-menu-target="ref_depr_oldsyntax">Old FTL syntax</a></li><li><a class="page-menu-link" href="ref_depr_numerical_interpolation.html" data-menu-target="ref_depr_numerical_interpolation">#{...}: Numerical interpolation</a></li></ul></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="pgui_misc_jythonwrapper.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins.html"><span>Next</span></a></div></div></div></div> </div> - </div> -<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"><div class="column"><h3 class="column-header">Overview</h3><ul><li><a href="http://freemarker.org/">What is FreeMarker?</a></li><li><a href="http://freemarker.org/freemarkerdownload.html">Download</a></li><li><a href="app_versions.html">Version history</a></li><li><a href="http://freemarker.org/history.html">About us</a></li><li><a itemprop="license" href="app_license.html">License</a></li></ul></div><div class="column"><h3 class="column-header">Handy stuff</h3><ul><li><a href="http://freemarker-online.kenshoo.com/">Try template online</a></li><li><a href="dgui_template_exp.html#exp_cheatsheet">Expressions cheatsheet</a></li><li><a href="ref_directive_alphaidx.html">#directives</a></li><li><a href="ref_builtins_alphaidx.html">?built_ins</a></li><li><a href="ref_specvar.html">.special_vars</a></li></ul></div><div class="column"><h3 class="column-header">Community</h3><ul><li><a href ="https://github.com/freemarker/freemarker">FreeMarker on Github</a></li><li><a href="https://twitter.com/freemarker">Follow us on Twitter</a></li><li><a href="https://issues.apache.org/jira/browse/FREEMARKER/">Report a bug</a></li><li><a href="http://stackoverflow.com/questions/ask?tags=freemarker">Ask a question</a></li><li><a href="http://freemarker.org/mailing-lists.html">Mailing lists</a></li></ul></div></div><div class="col-right"><ul class="social-icons"><li><a class="github" href="https://github.com/freemarker/freemarker">Github</a></li><li><a class="twitter" href="https://twitter.com/freemarker">Twitter</a></li><li><a class="stack-overflow" href="http://stackoverflow.com/questions/ask?tags=freemarker">Stack Overflow</a></li></ul><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated"> -Last generated: -<time itemprop="dateModified" datetime="2017-03-13T10:55:28Z" title="Monday, March 13, 2017 10:55:28 AM GMT">2017-03-13 10:55:28 GMT</time>, for Freemarker 2.3.26 </p> -<p class="copyright"> -© <span itemprop="copyrightYear">1999</span>â2017 -<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="http://apache.org/">The Apache Software Foundation</a>. Apache FreeMarker, FreeMarker, Apache Incubator, Apache, the Apache FreeMarker logo are trademarks of The Apache Software Foundation. </p> -</div></div></div></body> -</html> http://git-wip-us.apache.org/repos/asf/incubator-freemarker-site/blob/a4004324/builds/2.3.26-nightly/ref_builtins.html ---------------------------------------------------------------------- diff --git a/builds/2.3.26-nightly/ref_builtins.html b/builds/2.3.26-nightly/ref_builtins.html deleted file mode 100644 index 9d783b9..0000000 --- a/builds/2.3.26-nightly/ref_builtins.html +++ /dev/null @@ -1,54 +0,0 @@ -<!doctype html> -<!-- Generated by FreeMarker/Docgen from DocBook --> -<html lang="en" class="page-type-chapter"> -<head prefix="og: http://ogp.me/ns#"> -<meta charset="utf-8"> -<title>Built-in Reference - Apache FreeMarker Manual</title> -<meta http-equiv="X-UA-Compatible" content="IE=edge"> -<meta name="viewport" content="width=device-width,initial-scale=1"> -<meta name="format-detection" content="telephone=no"> -<meta property="og:site_name" content="Apache FreeMarker Manual"> -<meta property="og:title" content="Built-in Reference"> -<meta property="og:locale" content="en_US"> -<meta property="og:url" content="http://freemarker.org/docs/ref_builtins.html"> -<link rel="canonical" href="http://freemarker.org/docs/ref_builtins.html"> -<link rel="icon" href="favicon.png" type="image/png"> -<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Roboto:500,700,400,300|Droid+Sans+Mono"> -<link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?1489402528979"> -<script> -(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ -(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), -m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) -})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); -ga('create', 'UA-55420501-1', 'auto'); -ga('send', 'pageview'); -</script> -</head> -<body itemscope itemtype="https://schema.org/Code"> - <meta itemprop="url" content="http://freemarker.org/docs/"> - <meta itemprop="name" content="Apache FreeMarker Manual"> - - <!--[if lte IE 9]> - <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div> - <![endif]--><div class="header-top-bg"><div class="site-width header-top"><a class="logo" href="http://freemarker.org" role="banner"> <img itemprop="image" src="logo.png" alt="FreeMarker"> -</a><ul class="tabs"><li><a href="http://freemarker.org/">Home</a></li><li class="current"><a href="index.html">Manual</a></li><li><a class="external" href="api/index.html">Java API</a></li></ul><ul class="secondary-tabs"><li><a class="tab icon-heart" href="http://freemarker.org/contribute.html" title="Contribute"><span>Contribute</span></a></li><li><a class="tab icon-bug" href="https://issues.apache.org/jira/browse/FREEMARKER/" title="Report a Bug"><span>Report a Bug</span></a></li><li><a class="tab icon-download" href="http://freemarker.org/freemarkerdownload.html" title="Download"><span>Download</span></a></li></ul></div></div><div class="header-bottom-bg"><div class="site-width search-row"><a href="index.html" class="navigation-header">Manual</a><div class="navigation-header"></div><form method="get" class="search-form" action="search-results.html"><fieldset><legend class="sr-only">Search form</legend><label for="search-field" class="sr-only">Search query</label><input id="searc h-field" name="q" type="search" class="search-input" placeholder="Search" spellcheck="false" autocorrect="off" autocomplete="off"><button type="submit" class="search-btn"><span class="sr-only">Search</span></button></fieldset></form></div><div class="site-width breadcrumb-row"><ul class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"><li class="step-0" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="index.html"><span itemprop="name">Apache FreeMarker Manual</span></a></li><li class="step-1" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref.html"><span itemprop="name">Template Language Reference</span></a></li><li class="step-2" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a class="label" itemprop="item" href="ref_builtins.html"><span itemprop="name">Built-in Reference</span></a></li></ul><div class="bo okmarks" title="Bookmarks"><span class="sr-only">Bookmarks:</span><ul class="bookmark-list"><li><a href="alphaidx.html">Alpha. index</a></li><li><a href="gloss.html">Glossary</a></li><li><a href="dgui_template_exp.html#exp_cheatsheet">Expressions</a></li><li><a href="ref_builtins_alphaidx.html">?builtins</a></li><li><a href="ref_directive_alphaidx.html">#directives</a></li><li><a href="ref_specvar.html">.spec_vars</a></li><li><a href="app_faq.html">FAQ</a></li></ul></div></div></div> <div class="main-content site-width"> - <div class="content-wrapper"> - <div id="table-of-contents-wrapper" class="col-left"> - <script>var breadcrumb = ["Apache FreeMarker Manual","Template Language Reference","Built-in Reference"];</script> - <script src="toc.js?1489402528979"></script> - <script src="docgen-resources/main.min.js?1489402528979"></script> - </div> -<div class="col-right"><div class="page-content"><div class="page-title"><div class="pagers top"><a class="paging-arrow previous" href="ref.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_alphaidx.html"><span>Next</span></a></div><div class="title-wrapper"> -<h1 class="content-header header-chapter" id="ref_builtins" itemprop="headline">Built-in Reference</h1> -</div></div><div class="page-menu"> -<div class="page-menu-title">Section Contents</div> -<ul><li><a class="page-menu-link" href="ref_builtins_alphaidx.html" data-menu-target="ref_builtins_alphaidx">Alphabetical index</a></li><li><a class="page-menu-link" href="ref_builtins_string.html" data-menu-target="ref_builtins_string">Built-ins for strings</a></li><li><a class="page-menu-link" href="ref_builtins_number.html" data-menu-target="ref_builtins_number">Built-ins for numbers</a></li><li><a class="page-menu-link" href="ref_builtins_date.html" data-menu-target="ref_builtins_date">Built-ins for date/time/date-time values</a></li><li><a class="page-menu-link" href="ref_builtins_boolean.html" data-menu-target="ref_builtins_boolean">Built-ins for booleans</a></li><li><a class="page-menu-link" href="ref_builtins_sequence.html" data-menu-target="ref_builtins_sequence">Built-ins for sequences</a></li><li><a class="page-menu-link" href="ref_builtins_hash.html" data-menu-target="ref_builtins_hash">Built-ins for hashes</a></li><li><a class="page-menu-link" href="ref_builtins_node.ht ml" data-menu-target="ref_builtins_node">Built-ins for nodes (for XML)</a></li><li><a class="page-menu-link" href="ref_builtins_loop_var.html" data-menu-target="ref_builtins_loop_var">Loop variable built-ins</a></li><li><a class="page-menu-link" href="ref_builtins_type_independent.html" data-menu-target="ref_builtins_type_independent">Type independent built-ins</a></li><li><a class="page-menu-link" href="ref_builtins_expert.html" data-menu-target="ref_builtins_expert">Seldom used and expert built-ins</a></li></ul> </div><div class="bottom-pagers-wrapper"><div class="pagers bottom"><a class="paging-arrow previous" href="ref.html"><span>Previous</span></a><a class="paging-arrow next" href="ref_builtins_alphaidx.html"><span>Next</span></a></div></div></div></div> </div> - </div> -<div class="site-footer"><div class="site-width"><div class="footer-top"><div class="col-left sitemap"><div class="column"><h3 class="column-header">Overview</h3><ul><li><a href="http://freemarker.org/">What is FreeMarker?</a></li><li><a href="http://freemarker.org/freemarkerdownload.html">Download</a></li><li><a href="app_versions.html">Version history</a></li><li><a href="http://freemarker.org/history.html">About us</a></li><li><a itemprop="license" href="app_license.html">License</a></li></ul></div><div class="column"><h3 class="column-header">Handy stuff</h3><ul><li><a href="http://freemarker-online.kenshoo.com/">Try template online</a></li><li><a href="dgui_template_exp.html#exp_cheatsheet">Expressions cheatsheet</a></li><li><a href="ref_directive_alphaidx.html">#directives</a></li><li><a href="ref_builtins_alphaidx.html">?built_ins</a></li><li><a href="ref_specvar.html">.special_vars</a></li></ul></div><div class="column"><h3 class="column-header">Community</h3><ul><li><a href ="https://github.com/freemarker/freemarker">FreeMarker on Github</a></li><li><a href="https://twitter.com/freemarker">Follow us on Twitter</a></li><li><a href="https://issues.apache.org/jira/browse/FREEMARKER/">Report a bug</a></li><li><a href="http://stackoverflow.com/questions/ask?tags=freemarker">Ask a question</a></li><li><a href="http://freemarker.org/mailing-lists.html">Mailing lists</a></li></ul></div></div><div class="col-right"><ul class="social-icons"><li><a class="github" href="https://github.com/freemarker/freemarker">Github</a></li><li><a class="twitter" href="https://twitter.com/freemarker">Twitter</a></li><li><a class="stack-overflow" href="http://stackoverflow.com/questions/ask?tags=freemarker">Stack Overflow</a></li></ul><a class="xxe" href="http://www.xmlmind.com/xmleditor/" rel="nofollow" title="Edited with XMLMind XML Editor"><span>Edited with XMLMind XML Editor</span></a></div></div><div class="footer-bottom"> <p class="last-generated"> -Last generated: -<time itemprop="dateModified" datetime="2017-03-13T10:55:28Z" title="Monday, March 13, 2017 10:55:28 AM GMT">2017-03-13 10:55:28 GMT</time>, for Freemarker 2.3.26 </p> -<p class="copyright"> -© <span itemprop="copyrightYear">1999</span>â2017 -<a itemtype="http://schema.org/Organization" itemprop="copyrightHolder" href="http://apache.org/">The Apache Software Foundation</a>. Apache FreeMarker, FreeMarker, Apache Incubator, Apache, the Apache FreeMarker logo are trademarks of The Apache Software Foundation. </p> -</div></div></div></body> -</html>
