This bookwill demonstrate the use of freely available Java Open Source(JOS) development frameworks for building and deploying applications. Specifically, we will focus on the JOS development frameworks available from the Apache Software Foundation (http://apache.org) as well as its Jakarta group (http://jakarta.apache.org). While most books are heavy on explanation and light on actual code demonstration, this book emphasizes approachable code examples. The authors of this book want to provide a roadmap of JOS development tools to build your applications. Our intent in this book is not to present each of the frameworks in minute detail. Frankly, many of the development frameworks presented in this book could have entire books written about them. This book will build a simple application using the following Apache technologies, except for XDoclet:
Struts Web Development framework: A Model-View-Controller–based development framework that enables developers to quickly assemble applications in a pluggable and extensible manner. This book will highlight some of the more exciting pieces of the Struts 1.2 framework. These pieces are described next.
Tiles: A new user interface framework that allows a development team to “componentize” a screen into granular pieces of code that can be easily built and updated.
Dynamic ActionForms and Validator framework: A new set of tools for alleviating many of the more monotonous tasks of writing web-based data collection screens.
Lucene: A powerful indexing and search tool that can be used to implement a search engine for any web-based application.
Jakarta Velocity: A templating frameworkthat allows a development team to easily build “skinnable” applications, whose “look and feel” can be easily modified and changed.
ObjectRelationalBridge (OJB): An object/relational mapping tool that significantlysimplifies the development of data access code against a relational database. ObjectRelationalBridge can literally allow a development team to build an entire application without ever having to write a single line of JDBC code.
XDoclet: A metatag-based, code-generation tool that eliminates the need for a developer to support the usual plethora of J2EE (web.xml, ejb-jar.xml, etc.) and Struts (struts-config.xml, validation.xml, etc.) configuration files. It is important to note that XDoclet is not an Apache technology. However, XDoclet has strong support for Struts and has been included as a topic of discussion for this book.
Ant: An industry-accepted Java build utility that allows you to create sophisticated application and deployment scripts.
Chapter 1: Pro Apache Struts with Ajax