使用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的更多相关文章

  1. 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 ...

  2. 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 ...

  3. Spring mvc 中使用ftl引用共通文件出错 FreeMarker template error: Error reading included file "/WEB-INF/ftl/common/errormessage.ftl"

    初次接触spring mvc,想做一个小的练习项目,结果在ftl文件中引用其它的共通ftl文件时出错.

  4. FreeMarker template error!

    部署项目后发现以下“FreeMarker template error!”的问题,google.baidu猛一顿搜索无果后开始认真分析异常信息. FreeMarker template error! ...

  5. 【问题记录】使用FreeMarker生成数据,模板明明没错却一直报错“The following has evaluated to null or missing:”

    今天使用FreeMarker生成数据时一直报错,错误信息是“The following has evaluated to null or missing:”,告知我找不到值. 但是我再三确认,这些属性 ...

  6. 关于Struts2的客户端校验的FreeMarker template error!

    把<s:form action="login" namespace="/" validate="true" >改为 <s: ...

  7. springboot FreeMarker template error

    注释掉<#list>xxx</#list> 现在运行就不报错了

  8. 异常-----freemarker.template.TemplateException

    一,案例一 1.1.错误描述 五月 30, 2014 11:33:57 下午 freemarker.log.JDK14LoggerFactory$JDK14Logger error 严重: Templ ...

  9. 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 ...

随机推荐

  1. Linux安全应用之防垃圾邮件服务器的构建

    Linux安全应用之防垃圾邮件服务器的构建 一.垃圾邮件产生的原因 垃圾邮件(SPAM) 也称作UCE(Unsoticited Commercial Email.未经许可的商业电子邮件)或UBE(Un ...

  2. 紫书 例题 9-1 UVa 1025 ( DAG的动态规划)

    影响到状态的只有时间和在哪个车站(空间),所以可以设f[i][j]是时刻i的时候在第j个车站的最少等待时间 因为题目中的等待时间显然是在0时刻1车站,所以答案为f[0][1],那么就提醒我们从大推到小 ...

  3. SimpleDateFormat 时间格式化

  4. CSUOJ 1651 Weirdo

    1651: Weirdo Time Limit: 5 Sec  Memory Limit: 128 MBSubmit: 40  Solved: 21[Submit][Status][Web Board ...

  5. Android数据库高手秘籍(三)——使用LitePal升级表

    转载请注明出处:http://blog.csdn.net/guolin_blog/article/details/39151617 在上一篇文章中,我们学习了LitePal的基本使用方法,体验了使用框 ...

  6. 出乎意料的else语句

    在python中你可能时不时不碰到else语句用在while和for循环中,请不要吃惊,先看看它的作用吧! 实际上在循环语句中,else子句仅仅会在循环完毕后运行.即跳出循环的操作.如break,同一 ...

  7. atitit.jndi的架构与原理以及资源配置and单元測试实践

    atitit.jndi的架构与原理以及资源配置and单元測试实践 1. jndi架构 1 2. jndi实现原理 3 3. jndi资源配置 3 3.1. resin  <database> ...

  8. [Servlet]研究ServletContext对象

    作者信息 作者姓名:金云龙 个人站点:http://www.longestory.com 个人公众帐号:搜索"longestory"或"龙哥有话说" Servl ...

  9. jQuery11 data() : 数据缓存

    <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content ...

  10. Token ,Cookie和Session的区别--学习笔记

    http://blog.csdn.net/tobetheender/article/details/52485948 Token token的意思是“令牌”,是用户身份的验证方式,最简单的token组 ...