Spring WebFLow 处理 JSP 中的请求
我是 Spring Webflow
的新手,我正在使用自定义 FlowHandler
我可以访问相应的控制器,但如果在请求对象中设置属性,我无法获取它JSP 即查看状态
。
我该如何进行呢?
I am newbie to Spring Webflow
, I have am using Custom FlowHandler
I can reach the respective Controller, but if set an attribute in a request Object I don't get it in JSP that is View state
.
How can I proceed in this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
你不应该在 spring webflow 中为你的请求属性设置任何东西 - 没有必要,除了 webflow 做了一些内部请求重定向,并且可能你的属性是丢失的。
您在流程中创建的所有变量都可以在视图中使用,就像通过向请求添加属性来设置它们一样。 是通过标签创建它们还是通过标签执行一些服务调用来创建
you shouldn't set anything to your request attributes in spring webflow - there is no need, besides webflow does some internal request redirecting and probably your attributes are los.
all the variables you create in the flow are available in view as if they were set by adding attribute to request. wether you create them via tag or create by executing some service calls via tag
嘿 Miceuz 感谢您的回复.....
在流程开始时,我调用一个扩展 FormAction 的 Contorller
在firsthit 方法中,我设置一个请求属性,如下所示
如果我尝试在 JSP 中访问,则将其设置为 null...如你说Webflow有内部重定向..那么我如何访问控制器中设置的值?
Hey Miceuz thanks for Replying .....
On start of the flow I am invoking a Contorller which extends FormAction
In firsthit Method I am setting a request Attribute as below
If i try to access in JSP , getting it as null... as you said Webflow has internal redirect.. Then how can I access the Value that has been set in Controller?