未找到流定义。 Spring网络流
我是 Spring webflow 的新手,现在我正在尝试 Spring 食谱书中的示例,我知道这是一个基本问题。
我收到如下错误,
org.springframework.webflow.definition.registry.NoSuchFlowDefinitionException: No flow definition '${flowExecutionUrl}&_eventId=next' found
at org.springframework.webflow.definition.registry.FlowDefinitionRegistryImpl.getFlowDefinitionHolder(FlowDefinitionRegistryImpl.java:126)
at org.springframework.webflow.definition.registry.FlowDefinitionRegistryImpl.getFlowDefinition(FlowDefinitionRegistryImpl.java:61)
at org.springframework.webflow.executor.FlowExecutorImpl.launchExecution(FlowExecutorImpl.java:138)
at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:193)....
如下所示是我的配置,
<bean name="flowController" class="org.springframework.webflow.mvc.servlet.FlowController">
<property name="flowExecutor" ref="flowExecutor"></property>
</bean>
<webflow:flow-executor id="flowExecutor" />
<webflow:flow-registry id="flowRegistry" >
<webflow:flow-location path="/WEB-INF/flows/welcome/welcome.xml"></webflow:flow-location>
</webflow:flow-registry>
/WEB-INF/flows/welcome/welcome.xml,
<view-state id="welcome">
<transition on="next" to="introduction" />
<transition on="skip" to="menu" />
</view-state>
<view-state id="introduction">
<on-render>
<evaluate expression="libraryService.getHolidays()" result="requestScope.holidays" />
</on-render>
<transition on="next" to="menu" />
</view-state>
<view-state id="menu"></view-state>
在welcome.jsp中,
<a href="${flowExecutionUrl}&_eventId=next">Next</a>
<a href="${flowExecutionUrl}&_eventId=skip">Skip</a>
请让我知道出了什么问题。我正在使用 2.0.9 版本。
提前致谢, 标清
I am new to Spring webflow and now I am trying the example in Spring recipes book and I know this is a basic question.
I am getting the error as follows,
org.springframework.webflow.definition.registry.NoSuchFlowDefinitionException: No flow definition '${flowExecutionUrl}&_eventId=next' found
at org.springframework.webflow.definition.registry.FlowDefinitionRegistryImpl.getFlowDefinitionHolder(FlowDefinitionRegistryImpl.java:126)
at org.springframework.webflow.definition.registry.FlowDefinitionRegistryImpl.getFlowDefinition(FlowDefinitionRegistryImpl.java:61)
at org.springframework.webflow.executor.FlowExecutorImpl.launchExecution(FlowExecutorImpl.java:138)
at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:193)....
Shown below is my configurations,
<bean name="flowController" class="org.springframework.webflow.mvc.servlet.FlowController">
<property name="flowExecutor" ref="flowExecutor"></property>
</bean>
<webflow:flow-executor id="flowExecutor" />
<webflow:flow-registry id="flowRegistry" >
<webflow:flow-location path="/WEB-INF/flows/welcome/welcome.xml"></webflow:flow-location>
</webflow:flow-registry>
/WEB-INF/flows/welcome/welcome.xml,
<view-state id="welcome">
<transition on="next" to="introduction" />
<transition on="skip" to="menu" />
</view-state>
<view-state id="introduction">
<on-render>
<evaluate expression="libraryService.getHolidays()" result="requestScope.holidays" />
</on-render>
<transition on="next" to="menu" />
</view-state>
<view-state id="menu"></view-state>
In welcome.jsp,
<a href="${flowExecutionUrl}&_eventId=next">Next</a>
<a href="${flowExecutionUrl}&_eventId=skip">Skip</a>
Please let me know what is going wrong. I am using 2.0.9 Release.
Thanks in advance,
SD
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的行为就像您已进入
欢迎
流程,但实际上您并没有。尝试在项目的根目录中创建index.html文件,并将以下链接放在那里(供用户手动输入您的应用程序)...或以下链接自动导航到您的流程:
...其中
spring 是 web.xml 中 Spring MVC Dispatcher Servlet 的 url 模式(可以说
You act as you had entered the
welcome
flow, but you haven't. Try to create index.html file in the root of your project and put the following link there (for user to manually enter your app)... or following to navigate to your flow automatically:
... where
spring
is the url pattern of your Spring MVC Dispatcher Servlet in your web.xml (lets say看起来 ${flowExecutionKey} 的值没有被填充。试试这个
,welcome.jsp 看起来像
Looks like the values of ${flowExecutionKey} is not getting populated. Try this
so welcome.jsp will look like