struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk Forchel <dirk.forc...@exedio.com>
Subject Re: [S2] Result Type Dispatch problem with relative Action calls
Date Tue, 13 Jan 2009 13:26:21 GMT

This issue drives me almost insane.
After using my own History Stack (for each page request I store the request
string e.g. "/welcome.action" and the ActionContext) and my own result type
(behaving similiar to the ActionChainResult) but pulling the latest request
from my stack and chain to that action, I'm experiencing some interesting
behavior when forwarding to that action if validation fails. 
First I have to add an "input" result for each action used in my struts
config file. 
Second, instead of executing the service method of that action the method is
bypassed entirely - instead the request is forwarded to the "input" result
defined in the struts mapping of that action class.
See also
http://www.nabble.com/Struts-2%3A-Action-chaining-behaving-differently-when-validations-fire-td17065631.html#a17070480.
Has anybody a solution for that behaviour?


newton.dave wrote:
> 
> Dirk Forchel wrote:
>> I could not resolve my problem yet. How can I use the "dispatch" result
>> type
>> to forward to actions (or maybe tiles definitions) rather than to JSPs?
> 
> You can't, AFAIK. You use "redirectAction" to go to actions, and "tiles" 
> to go to Tiles. IIRC "tiles" aren't redirects, so you shouldn't lose 
> request-scoped data.
> 
> "dispatch" just uses the underlying JEE dispatcher, which means it only 
> knows about JEE-ish things, like JSPS and servlets. (This may no longer 
> be true; I'm not keeping up w/ the latest JEE specs.)
> 
> You can chain actions, but this is not a recommended practice, for a 
> variety of reasons.
> 
> http://struts.apache.org/2.x/docs/chain-result.html
> http://struts.apache.org/2.x/docs/action-chaining.html
> 
> Dave
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-S2--Result-Type-Dispatch-problem-with-relative-Action-calls-tp21368053p21435733.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message