异常评估OGNL表达式-原标题:Exception evaluating OGNL expression

接着来

原文地址:http://www.javabeat.net/org-thymeleaf-exceptions-templateprocessingexception-exception-evaluating-ognl-expression/

下面是主题:

org.thymeleaf.exceptions.TemplateProcessingException:异常评估OGNL表达式



When you work with Thymeleaf application, you would have encountered the TemplateProcessingException exceptions. The problem is the use of default context variables. It could be because of

当我们使用Thymeleaf 应用的时候,你可能遇到过不少次TemplateProcessingException 异常。其问题在于默认的上下文变量。这可能有以下两种原因:

    1. 错误的context变量名称

    2. 变量的属性写错了

举个例子:

org.thymeleaf.exceptions.TemplateProcessingException: Exception evaluating OGNL expression: "#httpSession.sessionValue" (thymeleaf:11)
at org.thymeleaf.standard.expression.OgnlVariableExpressionEvaluator.evaluate(OgnlVariableExpressionEvaluator.java:126)
at org.thymeleaf.standard.expression.VariableExpression.executeVariable(VariableExpression.java:149)
at org.thymeleaf.standard.expression.SimpleExpression.executeSimple(SimpleExpression.java:59)
at org.thymeleaf.standard.expression.Expression.execute(Expression.java:103)
at org.thymeleaf.standard.expression.Expression.execute(Expression.java:133)
at org.thymeleaf.standard.expression.Expression.execute(Expression.java:120)
at org.thymeleaf.standard.processor.attr.AbstractStandardTextChildModifierAttrProcessor.getText(AbstractStandardTextChildModifierAttrProcessor.java:68)
at org.thymeleaf.processor.attr.AbstractTextChildModifierAttrProcessor.getModifiedChildren(AbstractTextChildModifierAttrProcessor.java:59)
at org.thymeleaf.processor.attr.AbstractChildrenModifierAttrProcessor.processAttribute(AbstractChildrenModifierAttrProcessor.java:58)
at org.thymeleaf.processor.attr.AbstractAttrProcessor.doProcess(AbstractAttrProcessor.java:87)
at org.thymeleaf.processor.AbstractProcessor.process(AbstractProcessor.java:212)
at org.thymeleaf.dom.Node.applyNextProcessor(Node.java:973)
at org.thymeleaf.dom.Node.processNode(Node.java:928)
at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:672)
at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:655)
at org.thymeleaf.dom.Node.processNode(Node.java:947)
at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:672)
at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:655)
at org.thymeleaf.dom.Node.processNode(Node.java:947)
at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:672)
at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:655)
Caused by: ognl.NoSuchPropertyException: org.apache.catalina.session.StandardSessionFacade.sessionValue
at ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:151)
at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:2334)
at ognl.ASTProperty.getValueBody(ASTProperty.java:114)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)
at ognl.SimpleNode.getValue(SimpleNode.java:258)
at ognl.ASTChain.getValueBody(ASTChain.java:141)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)
at ognl.SimpleNode.getValue(SimpleNode.java:258)
at ognl.Ognl.getValue(Ognl.java:494)
at ognl.Ognl.getValue(Ognl.java:458)
at org.thymeleaf.standard.expression.OgnlVariableExpressionEvaluator.evaluate(OgnlVariableExpressionEvaluator.java:114)


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值