Posts

Showing posts with the label Everything about Result Configuration

Everything about Result Configuration

Image
When an action class method completes, it returns a String. The value of the String is used to select a result element. An action mapping will often have a set of results representing different possible outcomes. A standard set of result tokens are defined by the ActionSupport base class. Predefined result names String SUCCESS = "success" ; String NONE    = "none" ; String ERROR   = "error" ; String INPUT   = "input" ; String LOGIN   = "login" ; Of course, applications can define other result tokens to match specific cases. Returning ActionSupport.NONE (or null ) from an action class method causes the results processing to be skipped. This is useful if the action fully handles the result processing such as writing directly to the HttpServletResponse OutputStream. Result Elements The result element has two jobs. First, it provides a logical name. An Action can pass back a token like "suc...