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. 【Linux】MGR部署脚本

    脚本没有完善,现在只有上半部分的基础环境搭建 [准备条件] 1.三个节点的防火墙关闭 2.原有mysql卸载删除 3.文件夹名字: mgr 所有的源码包都放在mgr的文件夹下 4.文件位置: /roo ...

  2. 牛客练习赛 小D的Lemon 解题报告

    小D的Lemon 题意 已知 \[ g(x)=\left\{\begin{matrix} 1&,x=1\\ \sum_{i=1}^qk_i&,otherwise \end{matrix ...

  3. cf609E Minimum Spanning Tree For Each Edge (kruskal+倍增Lca)

    先kruskal求出一个最小生成树,然后对于每条非树边(a,b),从树上找a到b路径上最大的边,来把它替换掉,就是包含这条边的最小生成树 #include<bits/stdc++.h> # ...

  4. luogu4197 Peaks (kruskal重构树+主席树)

    按照边权排序建出kruskal重构树,每次就变成了先找一个权值<=x的最远的祖先,然后看这个子树的第k小.离散化一下,在dfs序上做主席树即可 而且只需要建叶节点的主席树 注意输出的是第k小点的 ...

  5. VLC1.2 播放视频迟滞卡

    用libvlc 提供的示例,用1080p播放本事是720p的视频,会有卡住的现象. 后改用32位播放后正常.(R,G,B的掩码需要适当调换.我在ubuntu上编译两个项目,掩码值都需要调换,不知道为什 ...

  6. A1028. List Sorting

    Excel can sort records according to any column. Now you are supposed to imitate this function. Input ...

  7. 【洛谷P1230】智力大冲浪

    题目大意:给定 N 项任务,每项任务有一个截至完成时间,若在截止时间之后完成要罚款 \(w_i\) 元,最初有 M 元,怎样完成能够留下最多得钱. 题解:按照罚款从多到少贪心,在查找能够最晚完成一项任 ...

  8. (qsort)绝对值排序

    绝对值排序 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Subm ...

  9. tp3 save操作小bug误区

    $china_area->save(['is_del' => 1,'updatetime' => time()]); SHOW COLUMNS FROM `tf_china_area ...

  10. C# 比较不错的拓扑图控件

    群内有下载 616945527