FreeMarker template error: The following has evaluated to null or missing
使用freemarker前端分页,报错:
FreeMarker template error: The following has evaluated to null or missing
后端直接赋值:
List<Student> stu=new ArrayList<Student>();
Student s1=null;
for(int i=1;i<46;i++){
s1=new Student();
s1.setAge(i+10);
s1.setId(i+"100");
s1.setName("ww"+i);
stu.add(s1);
} Page<Student > page = new PageImpl(stu,pageable,45);
model.addAttribute("content", page);
return new ModelAndView("/Page1",model);
分析可能原因:
1. Student列表中的对象的getter method不是public?
2. student类是否public类?
3. 引用的值是否正确?
经验证都没有问题。
后面发现和文件引入的位置有关,pagination.ftl应该是宏定义,应该放到文件的开头声明(目前放到文件的末尾导致)。
FreeMarker template error: The following has evaluated to null or missing的更多相关文章
- cosbench 异常 FreeMarker template error: The following has evaluated to null or missing
问题现象: 使用Cosbench 0.4.2.c4 版本测试Ceph RGW read test失败,遇到异常如下: FreeMarker template error: The following ...
- FreeMarker template error: The following has evaluated to null or missing: ==> blogger.md [in template "admin/about.ftl" at line 44, column 84]
FreeMarker template error:The following has evaluated to null or missing:==> blogger.md [in templ ...
- Spring mvc 中使用ftl引用共通文件出错 FreeMarker template error: Error reading included file "/WEB-INF/ftl/common/errormessage.ftl"
初次接触spring mvc,想做一个小的练习项目,结果在ftl文件中引用其它的共通ftl文件时出错.
- FreeMarker template error!
部署项目后发现以下“FreeMarker template error!”的问题,google.baidu猛一顿搜索无果后开始认真分析异常信息. FreeMarker template error! ...
- 【问题记录】使用FreeMarker生成数据,模板明明没错却一直报错“The following has evaluated to null or missing:”
今天使用FreeMarker生成数据时一直报错,错误信息是“The following has evaluated to null or missing:”,告知我找不到值. 但是我再三确认,这些属性 ...
- 关于Struts2的客户端校验的FreeMarker template error!
把<s:form action="login" namespace="/" validate="true" >改为 <s: ...
- springboot FreeMarker template error
注释掉<#list>xxx</#list> 现在运行就不报错了
- 异常-----freemarker.template.TemplateException
一,案例一 1.1.错误描述 五月 30, 2014 11:33:57 下午 freemarker.log.JDK14LoggerFactory$JDK14Logger error 严重: Templ ...
- string evaluated instead to freemarker.template.SimpleScalar
[2015-09-06 09:07:32.879] ERROR [6B68DD09CE6FECFE20936CA3C6D560AD:http-bio-8087-exec-8] o.a.s.v.free ...
随机推荐
- Linux常用音乐播放器
1.Rhythmbox是一个音乐播放和管理应用,GNOME桌面环境自带,它可以播放各种音频格式的音乐管理收藏的音乐.同时还具有音乐回放.音乐导入.刻录音频CD.显示专辑封面.显示歌词.DAAP共享等功 ...
- node.学习笔记(关于http2的讲解)
个人总结:读完这篇文章需要30分钟 http2部分很有学习价值,可以好好看. 用node搭建TCP服务器 用node搭建HTTP服务器 用node文件fs模块对文件读取,并用流的方式写入 用url路 ...
- Node书签
1.开源项目 [译]过去一年25个惊人的开源Node.js项目(2018版) 百度网盘下载助手
- 注解:@SuppressWarning()的用法
@SuppressWarning() 作用:J2SE 提供的一个批注或者注解.该批注的作用是给编译器一条指令,忽略这些警告信息. 常用:unchecked,serial. 1.如果传入多种情况,这几种 ...
- 【Codeforces Round #425 (Div. 2) A】Sasha and Sticks
[Link]: [Description] [Solution] 傻逼题; 获取n/k; 对n/k的奇偶性讨论一下就好 [NumberOf WA] 0 [Reviw] [Code] #include ...
- spring在web.xml中的配置
在实际项目中spring的配置文件applicationcontext.xml是通过spring提供的加载机制,自动加载的容器中去,在web项目中,配置文件加载到web容器中进行解析,目前,sprin ...
- Linux中为XEN网桥绑定物理网卡
XEN虚拟机会默认将可以连通外网的网卡绑定到xenbr0上, 因此如果需要切换到其他物理网卡上时,需要自己配置脚本或执行命令. 1.添加脚本绑定 a.编写一个脚本,指定网卡与网桥绑定的关系 # vim ...
- dlmalloc 2.8.6 源代码具体解释(5)
本文章由vector03原创, 转载请注明出处. 邮箱地址: mmzsmm@163.com, 欢迎来信讨论. 3. 分配及实现 本章节介绍dlmalloc的分配算法和实现.由于存在多mspac ...
- jquery2.0.3 全部源码
/*! * Includes Sizzle.js 选择器,独立的库 * http://sizzlejs.com/ */ (function( window, undefined ) { //" ...
- Outlook中设置会议的提醒
https://support.office.com/en-us/article/Set-or-remove-reminders-7a992377-ca93-4ddd-a711-851ef359792 ...