FreeMarker template error: The following has evaluated to null or missing: ==> pageNo [in template "wap_article_list.ftl" at line 3, column 75] Tip: If the failing expression is known to be legally null/missing, either specify a default value with myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthessis: (myOptionVar.foo)!myDefault, (myOptionVar.foo)?? The failing instruction (FTL stack trace): ---------- ==> ${pageNo} [in template "wap_article_list.ftl" at line 3, column 73] #assign articlePage = articlePageByCa... [in template "wap_article_list.ftl" at line 3, column 1] ---------- Java stack trace (for programmers): ---------- freemarker.core.InvalidReferenceException: [... Exception message was already printed; see it above ...] at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:98) at freemarker.core.EvalUtil.coerceModelToString(EvalUtil.java:382) at freemarker.core.Expression.evalAndCoerceToString(Expression.java:115) at freemarker.core.DollarVariable.accept(DollarVariable.java:76) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.MixedContent.accept(MixedContent.java:93) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.Environment.renderElementToString(Environment.java:1798) at freemarker.core.StringLiteral.evalAndCoerceToString(StringLiteral.java:116) at freemarker.core.ListLiteral.getValueList(ListLiteral.java:103) at freemarker.core.MethodCall._eval(MethodCall.java:94) at freemarker.core.Expression.eval(Expression.java:111) at freemarker.core.Assignment.accept(Assignment.java:106) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.MixedContent.accept(MixedContent.java:93) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.Environment.process(Environment.java:243) at freemarker.template.Template.process(Template.java:277) at com.paidot.ocms.utils.FreemarkerUtils.exportHtml(FreemarkerUtils.java:102) at com.paidot.ocms.utils.FreemarkerUtils.exportArticleHtml(FreemarkerUtils.java:239) at com.paidot.ocms.utils.FreemarkerUtils.exportArticleHtml(FreemarkerUtils.java:249) at com.paidot.ocms.utils.FreemarkerUtils.exportCategory(FreemarkerUtils.java:157) at com.paidot.ocms.controller.admin.StaticController$1.run(StaticController.java:184) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)