struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bob Tiernay (JIRA)" <>
Subject [jira] Created: (WW-2323) ActionComponent does not respect struts.enable.DynamicMethodInvocation=false
Date Thu, 15 Nov 2007 02:09:34 GMT
ActionComponent does not respect struts.enable.DynamicMethodInvocation=false

                 Key: WW-2323
             Project: Struts 2
          Issue Type: Bug
          Components: Core Actions
    Affects Versions: 2.0.9
         Environment: Windows XP SP2, Tomcat
            Reporter: Bob Tiernay

<s:action name="xxx!yyy"> will always attempt to find an action with name "xxx" and
invoke it's method "yyy".  This is a result of 
org.apache.struts2.components.ActionComponent's executeAction method:


        // handle "name!method" convention.
        final String actionName;
        final String methodName;

        int exclamation = actualName.lastIndexOf("!");
        if (exclamation != -1) {
            actionName = actualName.substring(0, exclamation);
            methodName = actualName.substring(exclamation + 1);
        } else {
            actionName = actualName;
            methodName = null;


Note that the first branch in the if statement is *not* correct behavior in the case that
struts.enable.DynamicMethodInvocation has been set to false in

This bug appears to be the result of an incomplete backwards compatibility support, added
to enbale the old webwork ! convention. This was a notable change documented here:

The proposed solution is to respect the value struts.enable.DynamicMethodInvocation in ActionComponent
so that both values of true and false can be used consistently across the framework.

(See also Form component and ServletUrlRenderer for their use of struts.enable.DynamicMethodInvocation)

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

View raw message