I am reading Struts2 documentation and found that there was kind of contradiction in its documentation. In this link https://struts.apache.org/docs/convention-plugin.html
The Convention plugin allows action classes to define different results for an action. Results fall into two categories, global and local. Global results are shared across all actions defined within the action class. These results are defined as annotations on the action class. Local results apply only to the action method they are defined on
However, in another link, https://struts.apache.org/docs/result-annotation.html, it is suggested that :
The @Result annotation lives at the Action class level and not the method level. This matches what is found in an XML-based Action configuration. Do not be tempted to annotate your Action's methods; it will not work.
So which one is correct? Can @Result be defined in a method level?
Local results are configured to the action config using
@Actionproperty. In other words local results are configured where they allowed to. Using@Actionannotation you specify a propertyresultslist. This is where you can add@Resultannotations.There is a excerpt from the Dave Newton's book "Apache Struts 2 Web Application Development":
The wiki definition also correct