At 4:29 PM -0300 12/22/04, Ritchie Warsito wrote:
I'm gonna give a small bump here, cuz I'm really still troubling with this (for work). So if anyone have any idea or any other approach, please...
Tnx,
Ritchie

you can remove your DoTiles action and use the name of a tiles definition in the "path" value of any forward. You can also use a "forward" attribute in <action> instead of "type" when you simply want to route directly to a view page with no processing.


So your struts-config could look more like this:

<action-mappings >
<action path="/index" forward="index" />
<action path="/accOptions" forward="account" />
<action path="/getAccountAction" type="com.frontier.action.getAccountAction">
<forward name="success" path="account" />
</action>
<action path="/getMortgageAction" type="com.frontier.action.getMortgageAction">
<forward name="sucess" path="mortgage" />
</action>
</action-mappings>


Only problem is, it ain't working. Seems like by calling a double action forward it loses it's session or something.
So how can I accomplish what I want? Any idea's on this. It might be simple, but it's all new for me, so I have no clue anymore.
I hope it isn't too long, but I wanted to give as much needed detail as possible.

While I don't think you actually need action chaining after simplifying your struts-config, note that Struts is not designed for using action paths as the path of an ActionForward. Technically this works, because (except when the forward path is a tiles definition), all Struts does is call RequestDispatcher.forward(path) However, the behavior is not always straightforward.


This has been beaten to death on the list archives and is also discussed in the Wiki, so I won't repeat it all, but in short, while chaining actions sometimes works, it can be unpredictable in some cases. Struts 1.3 (in CVS still) is moving towards a more flexible way of composing small bits of behavior both for the overall request process as well as for individual actions.

Hope this helps a little...

Joe

--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Narrow minds are weapons made for mass destruction" -The Ex


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to