1.模板写法:

    <html>
<head>
<title>freemarker测试</title>
</head>
<body>
<#list mylist as item>
${item.name!}----------
${item.password!}-------
${item.sex!}----------
${item.photo!}-----------<br/>
</#list>
</body>
</html>

2.java代码

package servlet;

import java.io.IOException;
import java.io.Writer;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import bean.TestFreemarkerBean;
import freemarker.template.Configuration;
import freemarker.template.Template;
import freemarker.template.TemplateException; @SuppressWarnings("serial")
@WebServlet("/hello")
public class hello extends HttpServlet {
// 负责管理FreeMarker模板的Configuration实例
private Configuration cfg = null; public void init() throws ServletException {
// 创建一个FreeMarker实例
cfg = new Configuration();
// 指定FreeMarker模板文件的位置
cfg.setServletContextForTemplateLoading(getServletContext(), "/WEB-INF/templates");
} @SuppressWarnings("unchecked")
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// 建立数据模型
Map<String,Object> root = new HashMap();
/*root.put("message", "第一个入门程序");
root.put("name", "freemarker");*/
List<TestFreemarkerBean> list = new ArrayList<>();
list.add(new TestFreemarkerBean("乔治", "123456", "男", "wwwwwwww"));
list.add(new TestFreemarkerBean("乔治", "123456", "男", "wwwwwwww"));
list.add(new TestFreemarkerBean("乔治", "123456", "男", "wwwwwwww"));
list.add(new TestFreemarkerBean("乔治", "123456", "男", "wwwwwwww"));
list.add(new TestFreemarkerBean("乔治", "123456", "男", "wwwwwwww"));
list.add(new TestFreemarkerBean("乔治", "123456", "男", "wwwwwwww"));
list.add(new TestFreemarkerBean("乔治", "123456", "男", "wwwwwwww"));
list.add(new TestFreemarkerBean("乔治", "123456", "男", "wwwwwwww"));
list.add(new TestFreemarkerBean("乔治", "123456", "男", "wwwwwwww"));
list.add(new TestFreemarkerBean("乔治", "123456", "男", "wwwwwwww"));
root.put("mylist", list);
// 获取模板文件
Template t = cfg.getTemplate("test.ftl"); // 使用模板文件的Charset作为本页面的charset
// 使用text/html MIME-type
response.setContentType("text/html; charset=" + t.getEncoding());
Writer out = response.getWriter();
// 合并数据模型和模板,并将结果输出到out中
try {
// t.process(list, out); // 往模板里写数据
// request.setAttribute("mylist", list);
t.process(root, out); // 往模板里写数据
} catch (Exception e) {
e.printStackTrace();
}
} public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doPost(request, response);
} public void destroy() {
super.destroy();
}
}

3.测试结果:

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAADfCAIAAAAP7fx+AAAgAElEQVR4nO2dUaKcIAxFuyNWxILcjYtxP/ZDxCQkIU7n9aHc81U14ytRuJDMhD87AACAKfnz2/8BAAAAvwMEAAAAJuUTAVjzn0pej3Pbkuq/halyGgAAwK9jCsC2pD8G2oi+beuS/vz5k5btOonh3xBG5lzmMn5NXJI25Mbt42o+S3XbuvFwOK/hA1sDwGDcWQGsudfV2IjPDrYlTdZNr/FWCAB3xbYkOoKtmf5bH9y2JaWcUysAtoetWw1PI6DNif5bCQAwuCEA93paY20Eid7J2fo1GysmbmvYbEtqrxx+lB9yBWDNzxz9dwgAAD9KWAC2JdkdTV60Ax+T9dWvC8Dp2TsC8ORIHEJAJ+KJH44Rx3kRr4Fc+R1TgXVQqyXSRDn3Maz6DgX7bgoAjRf3yCvPAHT67BS99SQgAObQbQz/h+kNAXjw/B8rAAJ/jkcP5cd5FS+NzBWd78+oVqEmBq1AiNAKgIwuXneLuH6qQFBEABoLM3fAVlCqAKgqW7oeNXjQA4AAVJjGr/nPn5T4+5DXnb8Y25L+pJT4cTN/GMgq1sSYFQjRFwC5WsMS6wYdAfBTt9zz3O/ejTf2fawy8vdzy0OCENAFeQOuRNB1XLxA5sdrLtEXcqm8M4NaxZoYswIRPAEoc1FlmJFxt+vscc6OIIlhiZ9VT/J7kbdJnvzVW3oudMdpV0rJmy5mNh1lIZdbkeELurGcq3nA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59ySV54B6PTZKXrrSUAAzKHbGP4P0xsC8OD5P1YABP4cZYXUa7stHnhlMcjz/RnVKtTEoBUIEVoBkNHF624R108VCIoIQGNh5g7knmteElgmGfJKDR70ACAAFabxZT8UdpzrPq10L7iU+HEzfxjIKtbEmBUIEdsRTBlQfvR/9Ro6AuCnbrnnud+9G2/s+1hl5O/nlocEIaAL8gZciaDruHiBzI/XXKIv5BLZjXFAq1gTY1YggicAZS6qDDP6VjHX5Ky/Ixjv2PTBypP8XuRtkid/9ZaeC91x2pVS8qaLmU1HWcjlVmT4gm4s52oe8GcbdAXw8reqvg40E3Qe14/UkbZ4pl5svqM3oFWsiSGrBz/38C3/HV0AWFxNrrFrnxQCwWch2is8zWq9Yo7TgdH//HwNoap0hopdWxQ/NyswWQRRQmLldVpQjkVG9UgHHCeL04TvBrWKNTFmBfoEcgCmAHBEhBoCsO+mAARyw/u+e+G2+AqgXRX7gaeBCMV/HJhfP/UAAAD4SURBVBl8H8cYevWj49kuXOKPk+vVTddcviBE3TSqVaiJQSvQJZYD8NNw7VkIQEEbp50Y/LYkGeYxHCZuvNEflzWrC2YcXHuMiB7gnWpVUHKeLBiSkpIoZyfXzBKlY1uFmhi0Aj16AqD0ObXDcZno5wBejuqA6ysMjlvoJx1ntcrif5D+2Wc+A3Pd0oa43oycFah6rk8BpPNGtQo1MWgFOngCYLhUEQAZqsAKAHwRlpLSLuKtAuAjLAHw4xQQWvAfOBc12tfN5ltVAvB9sB8AAABMCgQAAAAmBQIAAACTAgEAAIBJgQAAAMCkQAAAAGBSIAAAADApfwHHos+usrshegAAAABJRU5ErkJggg==" alt="" />

Freemarker取list集合中数据(将模板填充数据后写到客户端HTML)的更多相关文章

  1. 取SQL分组中的某几行数据

    取SQL分组中的某几行数据 对表中数据分组,有时只需要某列的聚合值:有时却需要返回整行数据,常用的方法有:子查询.ROW_NUMBER.APPLY,总体感觉还是ROW_NUMBER比较直观.测试数据: ...

  2. 用NPOI从DataTable到Excel,向Excel模板填充数据

    DataTable---->Excel,填充数据 private IWorkbook workbook = null; private ISheet sheet = null; private ...

  3. 借助 SIMD 数据布局模板和数据预处理提高 SIMD 在动画中的使用效率

    原文链接 简介 为发挥 SIMD1 的最大作用,除了对其进行矢量化处理2外,我们还需作出其他努力.可以尝试为循环添加 #pragma omp simd3,查看编译器是否成功进行矢量化,如果性能有所提升 ...

  4. Aspose.cell中的Excel模板导出数据

    //Excel模板导数据(Eexcel中根据DataTable中的个数,给多个Sheet中的模板赋值) public void DataSetToManyExcel(string fileName, ...

  5. laravel7 数据迁移及填充数据

    1:置迁移数据表,创建生成模型和迁移文件: php artisan make:model Article -m 2:接着,在框架中的database/migrations文件夹中找到刚创建的用户表Ar ...

  6. 05. 取SQL分组中的某几行数据

    对表中数据分组,有时只需要某列的聚合值:有时却需要返回整行数据,常用的方法有:子查询.ROW_NUMBER.APPLY,总体感觉还是ROW_NUMBER比较直观.测试数据: if OBJECT_ID( ...

  7. python实例:在列表,字典,集合中,根据条件筛选数据

    1. 从列表中过滤掉 负数 from random import randint # 随机生成列表 data = [randint(-10, 10) for _ in range(10)] print ...

  8. .NET[C#]使用LINQ从List<T>集合中获取最后N条数据记录的方法有哪些?

    https://codedefault.com/2018/using-linq-to-get-the-last-n-elements-of-a-collection-in-csharp-applica ...

  9. 根据EXCEL模板填充数据

    string OutFileName = typeName+"重点源达标率" + DateTime.Now.ToString("yyyy-MM-dd");    ...

随机推荐

  1. JavaScript实现表单的全选,反选,获取值

    构思 通过for循环和for in循环来实现,界面效果如下 步骤 全选: 循环给所有的表单设置checked 反选: 循环内判断checked是否为true,如果为true则改为false否则改为tr ...

  2. 自学Linux Shell6.2-用户自定义环境变量

    点击返回 自学Linux命令行与Shell脚本之路 6.2-用户自定义环境变量 1.设置局部用户定义变量 一旦启动bash shell(或者执行一个shell脚本),你就能创建这个shell进程可见的 ...

  3. Spring Cloud学习(一)

    Spring Cloud是什么? Spring Cloud是一系列框架的有序集合.它利用Spring Boot的开发便利性巧妙地简化了分布式系统基础设施的开发,如服务发现注册.配置中心.消息总线.负载 ...

  4. Elasticsearch利用cat api快速查看集群状态、内存、磁盘使用情况

    使用场景 当Elasticsearch集群中有节点挂掉,我们可以去查看集群的日志信息查找错误,不过在查找错误日志之前,我们可以通过elasticsearch的cat api简单判断下各个节点的状态,包 ...

  5. Elasticsearch 常见问题的解决思路

    本文为es性能监控基础的扩展,大家可以先看下性能监控基础,熟悉下es的基本原理.为翻译性质文档,感谢原作者,原始文档地址 类似于汽车的运行方式,Elasticsearch旨在让用户快速上手和运行,而无 ...

  6. 【HDU3085】nightmare2 双向BFS

    对于搜索树分支很多且有明确起点和终点的情况时,可以采用双向搜索来减小搜索树的大小. 对于双向BFS来说,与单向最大的不同是双向BFS需要按层扩展,表示可能到达的区域.而单向BFS则是按照单个节点进行扩 ...

  7. 初探ant-design(web版本)

    第一步安装ant-design插件 第二步查看项目目录 第三步运行项目 我们查看index.js文件 这个其实是Datepicker组件的展示效果 第四步我们按照下面的代码代替Index.js中的内容 ...

  8. 对程序进行package封装

    一.package包 格式:package 代码必须写在源代码文件的第一句, 约定俗成使用公司域名的倒写,之后再加其他. for example: package cn.chuanzhiboke.te ...

  9. nginx设置反向代理后端jenklins,页面上的js css文件无法加载

    转载 2017年06月14日 22:36:59 8485 问题现象: nginx配置反向代理后,网页可以正常访问,但是页面上的js css文件无法加载,页面样式乱了. (1)nginx配置如下: (2 ...

  10. 愉快且方便的处理时间-- LocalDate

    java中做时间处理时一般会采用java.util.Date,但是相比于Date来说,还有更好的选择 -- java.time.LocalDate. 这是jdk8中新增的日期处理类,同时新增的还有ja ...