[
https://issues.apache.org/struts/browse/STR-3009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40366
]
Hubert Rabago commented on STR-3009:
------------------------------------
> 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.
Like the description says, ActionMapping's purpose is to hold information about
how an action is mapped. Your suggestion will give it processing duties as
well, and not for an action's mapping, but for how an action's outcome can be
converted to a URL.
ActionMapping, ActionForward, these simply hold data from struts-config.xml.
Having logic to formulate a URL is already a bit outside the purpose of
ActionForward. I don't agree that such logic belongs to the class whose duty
is to hold data about how an action is configured.
If you were to insist, I'd suggest putting that logic in RequestUtils or your
suggested ActionTransfer class, but not ActionMapping.
> 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".
You're barking at the wrong tree. I was dreaming of a whole slew of new
features. The pronouncement that S2 is the way forward to Ti left no room for
S1 and poured cold water on all that. But all that's OT for this ticket.
>to me the following /*code sample with String array*/ is simpler than
>/*ActionRedirect code sample*/.
It isn't about simplicity. Actually, I wouldn't mind changing ActionRedirect
to accept a string array like in your example to make it simpler. It's about
putting it in the right place. In this case, it's also trying to understand
what a new class would bring that struts-config's <forward> and ActionRedirect
doesn't already provide.
> 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.