当前位置: 代码迷 >> Java Web开发 >> jsp页面 报 FreeMarker template error! 求解决方案,该如何处理
  详细解决方案

jsp页面 报 FreeMarker template error! 求解决方案,该如何处理

热度:796   发布时间:2016-04-17 10:58:11.0
jsp页面 报 FreeMarker template error! 求解决方案
一下是jsp页面输出的信息:
请高手指教啊。freemarker 不太懂。
FreeMarker template error!

Expression org.userObject is undefined on line 102, column 29 in base/views/org/orgInfoMain.ftl.
The problematic instruction:
----------
==> ${org.userObject.users?size} escaped ${org.userObject.users?size?if_exists} [on line 102, column 27 in base/views/org/orgInfoMain.ftl]
----------

Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: Expression org.userObject is undefined on line 102, column 29 in base/views/org/orgInfoMain.ftl.
at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:134)
at freemarker.core.Dot._getAsTemplateModel(Dot.java:78)
at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
at freemarker.core.BuiltIn$sizeBI._getAsTemplateModel(BuiltIn.java:615)
at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
at freemarker.core.BuiltIn$if_existsBI._getAsTemplateModel(BuiltIn.java:674)
at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
at freemarker.core.Expression.getStringValue(Expression.java:93)
at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.IfBlock.accept(IfBlock.java:82)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:160)
at freemarker.core.Environment.visit(Environment.java:351)
at freemarker.core.IteratorBlock.accept(IteratorBlock.java:95)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.EscapeBlock.accept(EscapeBlock.java:84)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.Environment.process(Environment.java:176)
at freemarker.template.Template.process(Template.java:231)
at com.opensymphony.webwork.views.freemarker.FreemarkerResult.doExecute(FreemarkerResult.java:77)
at com.opensymphony.webwork.dispatcher.WebWorkResultSupport.execute(WebWorkResultSupport.java:109)
at com.opensymphony.xwork.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:258)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:182)
at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:164)
at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:164)
at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:164)
at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:164)
at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:164)
at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:164)
  相关解决方案