Working with the WebWork Framework, Page 3
<html> <head> <title>WebWork in Action</title> </head> <body> <p>Click the button below to activate HelloAction.</p> <form action="helloAction.action" method="post"> <p> <p><input type="text" name="name"/><input type="submit" /></p> </p> </form> </body> </html>
The success.jsp is more interesting because it uses WebWork tag libs and gets values from the response.
<%@ taglib uri="/WEB-INF/webwork.tld" prefix="ww" %> <html> <head> <title>WebWork in Action result</title> </head> <body> <ww:property value="greeting" /><ww:property value="name" /> </body> </html>
Here is the working version
In this article, I have shown how to set up and configure a project with the WebWork framework. I have also shown a sample application that uses actions and accesses an action's property using tags. This approach can (and should) be expanded when developing your applications. The WebWork framework provides a powerful mechanism for building robust Web applications that I only began to discuss here. The framework has a lot more features to offer for building robust Web applications. If you are looking for a Java Web development framework, you definitely should consider WebWork.
About the Author
Vlad Kofman is a Senior System Architect working on projects under government defense contracts. He has also been involved with enterprise-level projects for major Wall Street firms and the U.S. government. His main interests are object-oriented programming methodologies and design patterns.