【发布时间】:2013-08-25 20:31:50
【问题描述】:
Apache Tiles 2.1.3 具有通配符功能,其中切片定义包含星号:
<definition name="flow/*" extends=".mainTemplate">
<put-attribute name="header" value="/WEB-INF/jsp/header.jsp" />
<put-attribute name="body" value="/WEB-INF/jsp/flow/{1}.jsp" />
</definition>
解释了here,但基本上这种布局用于“流”目录中的任何JSP。
问题是 Spring Webflow 使用 Tiles 产生了无限递归:
org.springframework.webflow.execution.FlowExecutionException: Exception thrown in state 'createAccount' of flow 'jsp/flow'
Caused by: java.lang.IllegalStateException: Exception occurred rendering view null
Caused by: java.lang.NullPointerException
我最终插入了许多单独的 Tiles 定义而不是一个通配符定义(在此处插入皱眉脸)。
Tiles 通配符如何与 Spring WebFlow 配合使用?
【问题讨论】:
-
这与您引用的问题不同 [link] (stackoverflow.com/questions/334431/…) 我有 Webflow 和 Tiles “工作”,我问的是一个特定的功能,通配符。另一个问题甚至没有解决这个功能。如果不是,请不要将其标记为重复,因为这样人们就不再看它了。
-
很遗憾,我无法回答您为什么会失败,但它在我们的 Web Flow 2.3.0 应用程序和 Tiles 2.2.2 中绝对有效。
-
@dbreaux - 谢谢,这给了我一些希望。我将更新我的版本并仔细检查我的图块布局的语法。
标签: java jsp spring-webflow tiles