org.apache.struts2.interceptor.parameter

## Annotation Type StrutsParameter

-     @Target(value={METHOD,FIELD})
       @Retention(value=RUNTIME)
      public @interface StrutsParameter

  Used to annotate public getter/setter methods or fields on `Action` classes that are intended for parameter injection by the `ParametersInterceptor`.
  Since:
    6.4.0

- - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element and Description
    --- | ---
    `int` | `depth` The depth to which parameter injection is permitted, where a depth of 0 only allows setters/fields directly on the action class.

- - ### Element Detail

    - #### depth

          public abstract int depth

      The depth to which parameter injection is permitted, where a depth of 0 only allows setters/fields directly on the action class. Setting within a POJO on an action will require a depth of 1 or more depending on the level of nesting within the POJO.

      In a practical sense, the depth dictates the number of periods or brackets that can appear in the parameter name.

      Default:
        0

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