WebWork1

WebWork 1 is a little old now for a web technology. It has been superseded by WebWork 2 and Struts 2. In its day though, it was the pioneer of decent action frameworks for Java.

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

	
	  PicoContainer-Web WebWork 1 Demo

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

	  
	    picoFilter
	    org.picocontainer.web.webwork.PicoActionFactory$ServletFilter
	  

	  
	    picoFilter
	    *.action
	  

	  
	    org.picocontainer.web.webwork.WebWorkPicoServletContainerListener
	  

	  
	    WebWork
	    webwork.dispatcher.ServletDispatcher
	    1
	  

	  
	    velocity
	    org.picocontainer.web.webwork.WebWorkVelocityServlet
	  

	  
	    WebWork
	    *.action
	  

	  
	    velocity
	    *.vm
	  

	  
	    index.html
	  

	
	

With this design you can use Constructor Injection and three tier container scoping for WebWork1 web applications. Our Maven example project is here. Make sure you make and configure your own WebappComposer implementation.

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