I threw all of my past experience with Struts out the window when I started my new job because we use WebWork. WebWork is approximately one thousand times better though so I’m not complaining. One of the unique to WebWork features (as compared to Struts) is the notion of a result type which is the process responsible for combining the model with a some kind of template (usually JSP or FreeMarker) to create a view.
doExecute() method with code that will look extremely similar to the existing doExecute() method. I’ll highlight the differences by showing you two lines from the existing doExecute() method:
// Process the template template.process(model, getWriter());
The end result is that with a little logic added to your WebWork action, you can include the result of that action in your own site:
<ww:action name="viewSnippet" executeResult="true" />