The method attribute tells the name of the method invoked after setting the properties of the action. This attribute can hold the name of the method or the index of the result mapping.
For example:
<action class="com.company.app.Login" method="login" name="login">
<result name="success">/success.jsp</result>
</action>
<action class="com.company.app.Login" method="{1}" name="login">
<result name="login">/success.jsp</result>
</action>
In both, the method signature is
public String login()