【发布时间】:2011-11-09 08:07:00
【问题描述】:
我正在使用 Struts 2.2.3 和 Tiles 2.1.4。它工作得很好,但现在我正在尝试使用 EL 表达式,但我无法让它工作。在 Struts2 中,我可以使用 <s:property value="${getText('Dashboard.label')}"/> 并从包中检索消息。我想在瓷砖定义上使用相同的。到目前为止,我已将 context-param 添加到 web.xml
<context-param>
<param-name>org.apache.tiles.evaluator.AttributeEvaluator</param-name>
<param-value>org.apache.tiles.evaluator.el.ELAttributeEvaluator</param-value>
</context-param>
现在我想在定义上使用以下表达式:
<put-attribute name="pane-title"
expression="${getText('Dashboard.label')}"
cascade="true"/>
问题是当我这样做时,屏幕无法创建:
找不到函数':getText'
所以我想我错过了一些东西,但我不知道为什么。有什么想法吗?
【问题讨论】: