This book covers everything you need to know about the Struts project and its supporting technologies,
including JSPs, servlets, Web applications, and the Jakarta−Tomcat JSP/servlet container. The goal of this
text is to provide you with the foundation you need to design, build, and deploy Jakarta Struts applications.
The Organization of the Book
The book you are about to begin is formatted as a tutorial describing the Jakarta Struts project. It is divided into 16 distinct chapters, beginning with an introduction of Struts and continuing with discussions about each of the major Struts components:
Chapter 1: Introducing the Jakarta Struts Project and Its Supporting Components lays the groundwork for the complete text. We introduce the Jakarta Struts project, and discuss the Model−View−Controller (MVC) design pattern that it’s based on. We also define Java Web applications, and explain how to construct and use them. In addition, we examine the Jakarta−Tomcat Web application container, the container used for all our examples.
Chapter 2: An Overview of the Java Servlet and JavaServer Pages Architectures contains a JSP and servlet primer. It is aimed at the Java developer who is not yet familiar with these two technologies. These topics are the foundation of Jakarta Struts projects, and you must understand them before continuing with the text.
Chapter 3: Getting Started with Struts is where we first encounter actual Struts code. This chapter covers the step−by−step process of building a Struts application by taking you through the development of a simple 1Struts application.
Chapter 4: The Controller begins our first detailed discussions of an individual group of Struts components. In this chapter, we look at four distinct Struts Controller components: the ActionServlet class, the Action class, Plugins, and the RequestProcesser.
Chapter 5: The Views discusses the Struts implementation of the View component of the MVC design pattern. This chapter covers everything you need to know when connecting JSPs to a Struts Controller. We also briefly discuss some of the tag libraries provided by the Struts framework.
Chapter 6: Internationalizing Your Struts Applications describes the Struts mechanisms for
internationalized application development. Here, we examine each of the components used and provide an example of internationalizing a Struts application.
Chapter 7: Managing Errors looks at some of the methods available to you when you’re managing errors in a Struts application. We begin by looking at the different error classes provided by the Struts framework, and we show how errors can be managed in both the Controller and Views of a Struts application by adding error handling to a sample application.
Chapter 8: Creating Custom ActionMappings discusses the org.apache. truts.action.ActionMapping class, which provides the information that the ActionServlet needs to know about the mapping of a request to a particular instance of an action class. After describing the default ActionMapping, we go on to explain how you can extend the ActionMapping class to provide specialized mapping information to the ActionServlet.
Chapter 9: The Struts JDBC Connection Pool discusses how you can leverage the built−in Struts functionality to manage a DataSource connected to a sample database.
Chapter 10: Debugging Struts Applications takes you through the process of creating an embedded version of the Tomcat container. We then describe the steps for adding the new container and a sample Struts application to an IDE for debugging.
Chapter 11: Developing a Complete Struts Application takes you through the development of an entire Struts application. The purpose of this chapter is to tie all of the previous discussions together by creating a practical Struts application.
Chapter 12: The struts−config.xml File describes the struts−config.xml file, the Struts deployment descriptor. We tell you how you can add and configure each major Struts component in this file.
Chapters 13–16: The Struts Custom Tag Libraries describe the Struts framework’s tag libraries. In these chapters, we examine each of the Struts tag libraries, including the Bean, HTML, Logic, and Template tag libraries. We describe the custom tags in the library, look at their attributes, and provide examples of how they can be used.