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 ...
随机推荐
- 突破极限 解决大硬盘上安装Sco Unix新思路
突破极限 解决大硬盘上安装Sco Unix新思路 [url]http://os.51cto.com/art/200809/89750.htm[/url] 硬盘越做越大,然我喜欢让我忧.10 ...
- JS实现PC端全兼容复制
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title&g ...
- 【Redis哨兵集群】
目录 开始配置主从复制 开始配置Redis Sentinel @ *** 在开始之前,我们先来看看Redis的主从复制 主从复制原理: 从服务器向主服务器发送SYNC命令. 主服务器接到SYNC命令后 ...
- 紫书 例题 9-2 UVa 437 ( DAG的动态规划)
很明显可以根据放不放建边,然后最一遍最长路即是答案 DAG上的动态规划就是根据题目中的二元关系来建一个 DAG,然后跑一遍最长路和最短路就是答案,可以用记忆化搜索的方式来实现 细节:(1)注意初始化数 ...
- TI Code Composer Studio MSP430系列驱动源代码
一.参考TI官网驱动源代码 安装打开Code Composer Studio,如下图所示,最近在调试MSP430G2533的AD,需要参考官网的底层驱动配置. 从Code Composer Studi ...
- C语言之基本算法39—字符串经典操作
//字符串概念! /* ================================================================== 题目:练习字符串的 1.输入输出 ...
- Python画图工具matplotlib的安装
今天在机子上安装matplotlib遇到一些问题,特将此记录下来,供大家分享以少走弯路. 1:下载matplotlib 去官网上下载你所须要的版本号http://matplotlib.org/down ...
- java 链接server上的 mongodb 出现 connect time out 问题
异常信息 十二月 22, 2014 5:27:58 下午 com.mongodb.DBTCPConnector initDirectConnection 警告: Exception executing ...
- 怎样及时检测出非正常断开的TCP连接(zz)
此处的”非正常断开”指TCP连接不是以优雅的方式断开,如网线故障等物理链路的原因,还有突然主机断电等原因有两种方法可以检测:1.TCP连接双方定时发握手消息 2.利用TCP协议栈中的KeepAlive ...
- 蓝桥杯训练 2n皇后
问题描述 给定一个n*n的棋盘,棋盘中有一些位置不能放皇后.现在要向棋盘中放入n个黑皇后和n个白皇后,使任意的两个黑皇后都不在同一行.同一列或同一条对角线上,任意的两个白皇后都不在同一行.同一列或同一 ...