freemarker template error: the following has evaluated to null or missing: ==> a.attr.toutiao [in template "web-inf/t/cms/www/default/alone/alone_头条.html" at line 75, column 48] 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[/#if]. (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): ---------- ==> #if a.attr.toutiao = "是" [in template "web-inf/t/cms/www/default/alone/alone_头条.html" at line 75, column 43] @cms_content_list titlen="35" orderby... [in template "web-inf/t/cms/www/default/alone/alone_头条.html" at line 74, column 18] ---------- 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.compare(evalutil.java:230) at freemarker.core.evalutil.compare(evalutil.java:148) at freemarker.core.comparisonexpression.evaltoboolean(comparisonexpression.java:103) at freemarker.core.conditionalblock.accept(conditionalblock.java:84) at freemarker.core.environment.visit(environment.java:265) at freemarker.core.mixedcontent.accept(mixedcontent.java:93) at freemarker.core.environment.visitbyhiddingparent(environment.java:286) at freemarker.core.iteratorblock$context.runloop(iteratorblock.java:193) at freemarker.core.environment.visititeratorblock(environment.java:509) at freemarker.core.iteratorblock.accept(iteratorblock.java:103) at freemarker.core.environment.visit(environment.java:265) at freemarker.core.environment$1.render(environment.java:313) at com.jeecms.cms.action.directive.contentlistdirective.execute(contentlistdirective.java:70) at freemarker.core.environment.visit(environment.java:341) at freemarker.core.unifiedcall.accept(unifiedcall.java:136) 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.jeecms.common.web.springmvc.simplefreemarkerview.rendermergedtemplatemodel(simplefreemarkerview.java:111) at org.springframework.web.servlet.view.abstracttemplateview.rendermergedoutputmodel(abstracttemplateview.java:167) at org.springframework.web.servlet.view.abstractview.render(abstractview.java:263) at org.springframework.web.servlet.dispatcherservlet.render(dispatcherservlet.java:1208) at org.springframework.web.servlet.dispatcherservlet.processdispatchresult(dispatcherservlet.java:992) at org.springframework.web.servlet.dispatcherservlet.dodispatch(dispatcherservlet.java:939) at org.springframework.web.servlet.dispatcherservlet.doservice(dispatcherservlet.java:856) at org.springframework.web.servlet.frameworkservlet.processrequest(frameworkservlet.java:936) at org.springframework.web.servlet.frameworkservlet.doget(frameworkservlet.java:827) at javax.servlet.http.httpservlet.service(httpservlet.java:617) at org.springframework.web.servlet.frameworkservlet.service(frameworkservlet.java:812) at javax.servlet.http.httpservlet.service(httpservlet.java:723) at org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:290) at org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:206) at com.jeecms.common.web.xssfilter.dofilter(xssfilter.java:42) at org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:235) at org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:206) at org.apache.shiro.web.servlet.abstractshirofilter.executechain(abstractshirofilter.java:449) at org.apache.shiro.web.servlet.abstractshirofilter$1.call(abstractshirofilter.java:365) at org.apache.shiro.subject.support.subjectcallable.docall(subjectcallable.java:90) at org.apache.shiro.subject.support.subjectcallable.call(subjectcallable.java:83) at org.apache.shiro.subject.support.delegatingsubject.execute(delegatingsubject.java:383) at org.apache.shiro.web.servlet.abstractshirofilter.dofilterinternal(abstractshirofilter.java:362) at org.apache.shiro.web.servlet.onceperrequestfilter.dofilter(onceperrequestfilter.java:125) at org.springframework.web.filter.delegatingfilterproxy.invokedelegate(delegatingfilterproxy.java:343) at org.springframework.web.filter.delegatingfilterproxy.dofilter(delegatingfilterproxy.java:260) at org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:235) at org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:206) at org.springframework.orm.hibernate3.support.opensessioninviewfilter.dofilterinternal(opensessioninviewfilter.java:230) at org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) at org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:235) at org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:206) at org.springframework.web.filter.characterencodingfilter.dofilterinternal(characterencodingfilter.java:88) at org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) at org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:235) at org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:206) at com.jeecms.common.web.processtimefilter.dofilter(processtimefilter.java:35) at org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:235) at org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:206) at org.apache.catalina.core.standardwrappervalve.invoke(standardwrappervalve.java:233) at org.apache.catalina.core.standardcontextvalve.invoke(standardcontextvalve.java:191) at org.apache.catalina.core.standardhostvalve.invoke(standardhostvalve.java:127) at org.apache.catalina.valves.errorreportvalve.invoke(errorreportvalve.java:103) at org.apache.catalina.core.standardenginevalve.invoke(standardenginevalve.java:109) at org.apache.catalina.connector.coyoteadapter.service(coyoteadapter.java:293) at org.apache.coyote.http11.http11processor.process(http11processor.java:861) at org.apache.coyote.http11.http11protocol$http11connectionhandler.process(http11protocol.java:620) at org.apache.tomcat.util.net.jioendpoint$worker.run(jioendpoint.java:489) at java.lang.thread.run(unknown source)