concept action method in category java

This is an excerpt from Manning's book Play for Java.
This defines an action method that generates an HTTP “OK” response with text content. If you still have the application running, you can save the file and reload http://localhost:9000/; it will serve a plain text document containing the customary greeting, as seen in figure 1.4.
In Play, a controller is an aggregation of action methods. An action method is a static method that takes some parameters as input and always returns an instance of (a subclass of) the Result class. In other words, an action method always takes the following form:
public static play.mvc.Result methodName(params...)Note that action methods are static. This is because controllers are effectively singletons, which fits the HTTP approach. Because HTTP doesn’t have the concept of an object but is mainly procedural, we shouldn’t try to map those object concepts in our controller. You should really think of your action methods as the entry point from HTTP to your application. You could compare them to the static main() method of a Java program.
Since an action method mainly serves as an entry point, you shouldn’t put too much business logic into your controllers and action methods. Rather, you should do what is necessary to translate an incoming HTTP request to data your business logic understands, hand it off to that business logic, and translate the result into an HTTP response.

This is an excerpt from Manning's book Portlets in Action.
if(synchronizeOnSession) { synchronized(mutex) { //invoke render or action method } }
The @Controller type-level annotation
accepts an optional value element, which specifies the logical name of the controller component. The value element is the same as the id attribute of a bean element, which you used in chapter 7 to define objects in the web application context XML file. As you can see, AddBookController doesn’t extend or implement a Spring-specific class or interface. The showAddBookForm method is a render method of the controller. The addBook method represents an action method of the controller.
In listing 8.10, the @ActionMapping annotation marks the addBook method as an action method of AddBookController. The optional params element specifies request parameter name-value pairs, which must be present in the portlet request to invoke the addBook method. The addBook method is invoked if the portlet mode is VIEW and the value of the myaction request parameter is addBook.
accepts an optional value element, which specifies the logical name of the controller component. The value element is the same as the id attribute of a bean element, which you used in