org.apache.struts2

## Interface ActionEventListener

- All Known Subinterfaces:
    ActionEventListener
  All Known Implementing Classes:
    ActionEventListener.LegacyAdapter

      public interface ActionEventListener

  Provides hooks for handling key action events

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `handleException(Throwable t, ValueStack stack)` Called when an exception is thrown by the action
    `Object` | `prepare(Object action, ValueStack stack)` Called after an action has been created.

- - ### Method Detail

    - #### prepare

          Object prepare(Object action,
                         ValueStack stack)

      Called after an action has been created.
      Parameters:
        `action` - The action
        `stack` - The current value stack
      Returns:
        The action to use

    - #### handleException

          String handleException(Throwable t,
                                 ValueStack stack)

      Called when an exception is thrown by the action
      Parameters:
        `t` - The exception/error that was thrown
        `stack` - The current value stack
      Returns:
        A result code to execute, can be null

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