[ 
https://issues.apache.org/struts/browse/STR-3009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40340
 ] 

Michael Jouravlev commented on STR-3009:
----------------------------------------

>> Basically, if ActionMapping.findForward is
>> called with name only it will return a frozen instance of
>> ActionForward, otherwise it will create a new instance on the
>> fly, with optional parameters and redirect flag. The URL
>> parameters can be sent as a separate parameter object, this
>> code can pulled out of ActionRedirect class.
>>
> I think that's even farther from ActionMapping's purpose than forming
> a URL is from ActionRedirect's, so I'm -1 on that.

>From ActionMapping Javadoc: "An ActionMapping represents the information that 
>the controller, RequestProcessor, knows about the mapping of a particular 
>request to an instance of a particular Action class. The ActionMapping 
>instance used to select a particular Action is passed on to that Action, 
>thereby providing access to any custom configuration information included with 
>the ActionMapping object."

I don't know how did you get ActionMapping's purpose from above description ;) 
and how my suggestion is going farther from it. IMHO, using ActionMapping for 
creating a parameterized URL is cleaner than creating an ActionForward 
directly. It is also simpler, a user has to learn only one method, 
ActionMapping.findForward instead of learning about ActionRedirect class and 
its quirks.

In any case, what's up with new features? Whenever someone suggests a fully 
backwards compatible extension, somebody else would inevitably come up with "it 
is against original class purpose and therefore should not be implemented". On 
the other hand, thanks for supporting action events :)


> ActionRedirect from ForwardConfig not redirecting properly?
> -----------------------------------------------------------
>
>                 Key: STR-3009
>                 URL: https://issues.apache.org/struts/browse/STR-3009
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.3.5, 1.3.6
>            Reporter: Jason Millard
>
> While migrating from Struts 1.2.9 to Struts 1.3.5, I noticed ActionRedirect 
> was no longer redirecting as expected. 
> In the Struts 1.2.9, in 
>   public ActionRedirect(ForwardConfig baseConfig) 
> setRedirect was always being set to TRUE, like it is in every other 
> constructor.
> However, as of Struts 1.3.5 it is now being configured as
>  setRedirect(baseConfig.getRedirect());
> This seems to defeat the purpose of a ActionRedirect if you are trying to 
> generate one from a
>   mapping.findForward();

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to