Child pages
  • Result Annotation

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin


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.


@Result Annotation Parameters


  • name - Result name; default Action.SUCCESS
  • value - Value of result (result destination)
  • type - Type of result; default NullResult. For example:
    • NullResult.class
    • FreemarkerResult.class
    • PlainTextResult.class
    • VelocityResult.class
    • ServletDispatcherResult.class
    • ServletRedirectResult.class
    • ServletActionRedirectResult.class - Equivalent to redirect-action equivalent to the redirectAction type in XML config.
    • TilesResult.class
    • .. (for more result, please consult the API docs, and look for implementations of the XWork Result interface)
  • params - An Array of the parameters in the form {key1, value1, key2, value2}

@Result – Defining a Single Result

Map the "success" result (explicitly named) to a Tile definition named "/".


@Results – Defining Multiple Results

Defines a set of results for an Action.


Wiki Markup
{dynamictasklist:Page Tasks}{dynamictasklist}