You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jacob Hookom <ho...@uwec.edu> on 2003/04/03 03:18:18 UTC

Composite Action

Hi,

I would like to write a CompositeAction class that would be configurable via
the struts config.  In it, I would like to use the Visitor Pattern in
processing all child actions.  From looking through the source, I was
wondering if there was a way to get access to the RequestProcessor object
either through the PlugIn interface, or from within an Action?  

Thanks!
Jacob Hookom


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Composite Action

Posted by Kris Schneider <kr...@dotech.com>.
Look at the code for ActionServlet.getRequestProcessor. It's a protected method, 
but the process it uses is pretty straightforward. To get a handle to an 
ActionServlet, use Action.getServlet. To get a handle to a ModuleConfig that 
you'll need to do something like ActionServlet.getRequestProcessor, use 
ActionConfig.getModuleConfig (ActionMapping is a subclass of ActionConfig).

Jacob Hookom wrote:
> Hi,
> 
> I would like to write a CompositeAction class that would be configurable via
> the struts config.  In it, I would like to use the Visitor Pattern in
> processing all child actions.  From looking through the source, I was
> wondering if there was a way to get access to the RequestProcessor object
> either through the PlugIn interface, or from within an Action?  
> 
> Thanks!
> Jacob Hookom

-- 
Kris Schneider <ma...@dotech.com>
D.O.Tech       <http://www.dotech.com/>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org