Struts Post process hooks

For some reasons struts does not provide post process hooks unlike preprocess one
  1. processPreprocess() method of standard  org.apache.struts.action.RequestProcessor
  2. servlet-standard-preprocess” Chain in Catalog “Struts” for the modern org.apache.struts.chain.ComposableRequestProcessor

Example post process implementations

Subclassing standard org.apache.struts.action.RequestProcessor

override the method : process(final HttpServletRequest request, final HttpServletResponse response)
Call your hook just before processForwardConfig() method [ In our case hook would be postProcess(request, response)]
If in case you want to do something after the ActionForm validation fails, you may have to override processValidate(), and call your hook from appropriate place, In our case just after setting Globals.ERROR_KEY in the request
Grab the source code here 

Using commons chain (Chain or responsibility and command pattern)

1) Step1


2) Step2
tiles-main-chain-config.xml is the exact replica of either org/apache/struts/chain/chain-config.xml (if you don’t use tiles)
org/apache/struts/tiles/chain-config.xml (if you use tiles)
3) Step3

<catalog name="struts">
 <chain name="servlet-standard-postprocess">
 <command className="com.test.struts.chain.commands.PostProcess"/>

Grab the source code Here