In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the relevant knowledge of "what are the characteristics of FreeMarker 2.3.19". In the operation of actual cases, many people will encounter such a dilemma. Then let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
FreeMarker is a template engine, a general tool for generating text output based on templates, written in pure Java.
FreeMarker is designed to generate HTML Web pages, especially applications based on the MVC pattern.
Although FreeMarker has some programming capabilities, the data to be displayed is usually prepared by the Java program, the page is generated by the FreeMarker, and the prepared data is displayed through the template (see the following figure)
Can FreeMarker be updated once? this update was released on February 29th.
This version fixes two important security bug, see here for details. In addition, a new method for dealing with JSON strings, json_string. There are other minor changes, please see the official release notes.
FreeMarker characteristics
1. Common goals
Ability to generate all kinds of text: HTML, XML, RTF, Java source code, etc.
Easy to embed into your product: lightweight; no need for Servlet environment
Plug-in template loader: templates can be loaded from any source, such as local files, databases, etc.
You can generate text as you want: save to a local file, send it as Email, send it back to Web browser from Web application
2. Powerful template language
All commonly used instructions: include, if/elseif/else, loop structure
Create and change variables in a template
You can use complex expressions to specify values almost anywhere
Named macros, which can have location parameters and nested content
Namespaces help build and maintain reusable macro libraries, or divide a large project into modules without having to worry about name conflicts
Output conversion blocks: transform HTML escape, compression, syntax highlighting, etc., when nesting template fragments generate output; you can define your own transformations
3. General data model
Instead of reflecting directly to the Java object, the FreeMarker object is encapsulated by a plug-in object and displayed as a variable in the template.
You can use abstract (interface) methods to represent objects (JavaBean, XML documents, SQL query result sets, etc.) and tell template developers how to use them so that they are not disturbed by technical details
4. Prepare for Web
Build structures in the template language to handle typical Web-related tasks (such as HTML escape)
Can be integrated into Model2 Web application framework as an alternative to JSP
Support for JSP tag libraries
Design for MVC patterns: separation of visual design and application logic; separation of page designers and programmers
5. Internationalization and localization of intelligence
Character set intelligence (internal use of UNICODE)
Localization sensitivity of digital format
Date and time format localization sensitive
Non-US character sets can be used as identifiers (such as variable names)
The same template for many different languages
6. Strong XML processing ability
And instructions (version 2.3) are used to recursively traverse the XML tree
Clear and intuitive access to the XML object model in the template
The open source forum JForum uses FreeMarker as the page template.
This is the end of the content of "what are the features of FreeMarker 2.3.19". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.