[
https://issues.apache.org/struts/browse/WW-2448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43297#action_43297
]
Brian Pontarelli commented on WW-2448:
--------------------------------------
I agree it isn't a bug. However, since the convention plugin is doing the
building of the configuration, this could be handled if the convention plugin
could ensure it was the last configuration provider. Perhaps the change is then
to provide pre and post configuration hook for providers (which they might
already have, I haven't checked the code on that to be certain).
> Overriding convention-based actions with declarative actions
> ------------------------------------------------------------
>
> Key: WW-2448
> URL: https://issues.apache.org/struts/browse/WW-2448
> Project: Struts 2
> Issue Type: New Feature
> Components: Plugin - Convention
> Affects Versions: 2.1.1
> Reporter: Brian Pontarelli
> Assignee: Brian Pontarelli
> Fix For: 2.1.x
>
>
> Adding a declarative XML mapping for an action does not supercede the
> convention-based action, as one might expect.
> For example, given an Action like
> package actions;
> public class ExampleContactsAction {
> adding a mapping for example-contact with a result
> <package name="my-default" extends="json-default">
> <action name="example-contacts" class="actions.ExampleContactsAction">
> <result type="json"/>
> </action>
> </package>
> doesn't work. The system reports that a "success" mapping is not found.
> Adding a mapping under another name (name="contacts") works just fine.
> Using the @Result annotation also works (except that OGNL complains that
> the JSON result doesn't have a location property).
> * http://code.google.com/p/jsonplugin/issues/detail?id=26
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.