Child pages
  • Parameters in configuration results
Skip to end of metadata
Go to start of metadata

Sometimes there is a need to redirect from one action to another, but you do not know the exact URL or that the destination URL requires parameters that are only known at run-time.

Struts 2 offers an easy solution for that problem.

Parameters in action result definitions

The only requirement is to declare the necessary properties in your action, in this case com.project.MyAction should define properties id and redirectURL with standard accessor methods.

In the above code if it returns SUCCESS then the browser will be forwarded to

  • No labels