org.apache.struts2.convention.annotation

## Annotation Type ResultPath

-     @Retention(value=RUNTIME)
       @Target(value={TYPE,PACKAGE})
      public @interface ResultPath

  This annotation allows the path to the results be to changed on a class by class basis. This will favor the property name setting and then the value.

  This is used when locating results for an action. In most cases a result is a JSP or some type of template (Velocity for example). In order to figure out which results are associated with an action, this class can be used to set the base directory that the Convention plugin looks at when trying to figure out the correct results. For example, if there is an action:

       com.example.foo.DoSomething

  The Convention plugin might find that the namespace is foo and the action name is do-something and will need to find the results. Using this annotation you can set the base path of the results to something like `/WEB-INF/jsps` so that the Convention plugin will look in the web application for files of this pattern:

       /WEB-INF/jsps/foo/do-something-<resultCode>.ext

- - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element and Description
    --- | ---
    `String` | `property`
    `String` | `value`

- - ### Element Detail

    - #### value

          public abstract String value

      Returns:
        The result path to use for this action, instead of the default.
      Default:
        ""

  - - #### property

          public abstract String property

      Returns:
        The name of the property from the struts.properties file that contains the result path for the action that contains this annotation. This property must be set and the struts.properties file must exist in the root of the classpath.
      Default:
        ""

Copyright © 2000–2024 Apache Software Foundation. All rights reserved.