Home > Guides > Core Developers Guide > Annotations > Result Annotation |
The @Result
annotation allows the definition of Action
results in the Action
class rather than an XML file.
In order for @Result
and @Results
annotations to be configured correctly you must set the actionPackages
filter init-param
to a comma-separated list of packages containing the annotated Action
classes. See Zero Configuration for further information; there are Action
class naming conventions if you don't implement the Action
interface and other tidbits there.
@Result
Annotation ParametersAction.SUCCESS
NullResult
. For example:
NullResult.class
FreemarkerResult.class
PlainTextResult.class
VelocityResult.class
ServletDispatcherResult.class
ServletRedirectResult.class
ServletActionRedirectResult.class
- equivalent to the redirectAction
type in XML configTilesResult.class
Result
interface)@Result
– Defining a Single ResultMap the "success" result (explicitly named) to a Tile definition named "/home.page".
@Results
– Defining Multiple ResultsDefines a set of results for an Action
.