Spring Request to handle WebFLow in JSP
3 answers
you shouldn't be specifying anything on request attributes in spring webflow - not necessary, besides, webflow does internal request redirection and your attributes are probably los.
all the variables you create in the stream are available in the view as if they were set by adding an attribute to the request. if you create them via tag or create by doing some housekeeping with tag
0
source to share
<on-start>
<evaluate expression="XXXControllerwsf.firstHit(flowRequestContext)" result="flowScope.res"/>
</on-start>
<decision-state id="urlcheck">
<if test="flowScope.res.reurl== 'splash' " then="splash" else="change"/>
</decision-state>
<view-state id="change" view="${flowScope.res.reurl}">
</view-state>
<view-state id="splash" view="forward:/XXX/jsp1/XXXchange1.jsp">
<transition on="buy" to="SignInSignUp"/>
</view-state>
</flow>
0
Hey Miceuz thanks for the answer .....
<on-start>
<evaluate expression="XXXXControllerwsf.firstHit(flowRequestContext)" result="flowScope.res"/>
</on-start>
<decision-state id="urlcheck">
<if test="flowScope.res.reurl== 'splash' " then="splash" else="change"/>
</decision-state>
<view-state id="change" view="${flowScope.res.reurl}">
</view-state>
<view-state id="splash" view="forward:/Jahia/jsp1/XXXXchange1.jsp">
<transition on="buy" to="SignInSignUp"/>
</view-state>
</flow>
At the start of the thread I call Contorller which extends FormAction
In the first method, I am setting the request attribute as below
request.setAttribute("rajan", "rajanweww");
request.setAttribute("rajan", Object);
If I try to access the JSP by getting it as null ... as you said Webflow has an internal redirect .. Then how can I access the value set in the controller?
-1