org.apache.struts2
Interface Action


public interface Action

Default action interface. Provided purely for user convenience. Struts does not require actions to implement any interfaces. Actions need only implement a public, no argument method which returns String. If a user does not specify a method name, Struts defaults to execute().

For example:

   static import ResultNames.*;

   public class MyAction implements Action {

     public String execute() {
       return SUCCESS;
     }
   }
 

is equivalent to:

   static import ResultNames.*;

   public class MyAction {

     public String execute() {
       return SUCCESS;
     }
   }
 

Author:
crazybob@google.com (Bob Lee)

Method Summary
 java.lang.String execute()
          Executes this action.
 

Method Detail

execute

java.lang.String execute()
Executes this action.

Returns:
result name which matches a result name from the action mapping in the configuration file. See ResultNames for common suggestions.


Copyright © 2000-2006 Apache Software Foundation. All Rights Reserved.