WebWork2

To configure PicoContainer to handle the dependency injection of WebWork2 actions, refer to the web.xml below. For a start there is a slightly different listener to the one defined in the main page. Also, instead of using WebWork2's servlet, use ours. Everything else from the standard WebWork2 setup is appropriate.

	
	  PicoContainer-Web WebWork 2 Demo

	  
	    webapp-composer-class
	    org.picocontainer.web.sample.ExampleWebappComposer
	  

	  
	    picoFilter
	    org.picocontainer.web.webwork2.PicoObjectFactory$ServletFilter
	  

	  
	    picoFilter
	    *.action
	  

	  
	    org.picocontainer.web.webwork2.WebWork2PicoServletContainerListener
	  

	  
	    action
	    com.opensymphony.webwork.dispatcher.ServletDispatcher
	  

	  
	    action
	    *.action
	  

	  
	    index.html
	  

	  
	    webwork
	    /WEB-INF/webwork.tld
	  

	


The Maven example project is here. Make sure you make and configure your own WebappComposer implementation.

See downloads on how to download the webwork2 module either using Maven or by downloading full distribution.