Chapter 19. Struts Framework

This chapter builds on the experience you gained in Chapter 18, "Web Frameworks," by looking at a framework that has become very popular in the J2EE development community. Apache Struts gained prominence in the J2EE community through its evolution as a Jakarta Project, and as of early 2004 has become an official Apache Project.

This chapter will introduce Struts to you by first outlining how it fulfills the MVC Model 2 architecture for applications. As this is a JSP book, we will then look at some of the custom tags that come with the framework.

Finally, this chapter will show you how to develop a small application along the same lines as those in Chapter 18. Like any rapidly maturing technology, various methods become available to solve common problems such as validation and form bean implementation. This chapter covers these variances where space permits.

Following are the main topics of this chapter:

  • A brief walk through the Struts framework.

  • An explanation of Struts Actions, Forms and View components

  • An example application using Struts

Introducing Struts

Apache Struts assists application developers in implementing an MVC Model 2 architecture in their J2EE applications. It provides them with a Controller-centric infrastructure that offers the usual lineup of MVC framework features:

  • Internationalization

  • Various validation techniques

  • Flexibility to interact with the model layer

  • Templating (Tiles)

  • Configuration infrastructure for everything from the Controller to ...

Get Beginning JavaServer Pages™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.