Book Image

Apache Struts 2 Web Application Development

By : Dave Newton
Book Image

Apache Struts 2 Web Application Development

By: Dave Newton

Overview of this book

<p>Struts 2.1 is a modern, extensible, agile web application framework suitable for both small- and large-scale web applications.<br /><br />The book begins with a comprehensive look at Struts 2.1 basics, interspersed with detours into more advanced development topics. You'll learn about configuring Struts 2.1 actions, results, and interceptors via both XML and Java annotations. You'll get an introduction to most of the Struts 2.1 custom tags and learn how they can assist in rapid application prototyping and development.<br /><br />From there you'll make your way into Struts 2.1's strong support for form validation and type conversion, which allows you to treat your form values as domain objects without cluttering your code. A look at Struts 2.1's interceptors is the final piece of the Struts 2.1 puzzle, allowing you to leverage the standard Struts 2 interceptors as well as implement your own custom behavior.<br /><br />After covering Struts 2.1 you'll journey into the world of JavaScript, a surprisingly capable language, the Document Object Model (DOM), and CSS, and learn how to create clean and concise client-side behavior. You'll leverage that knowledge as you move on to Struts 2 themes and templates, which give you a powerful way to encapsulate site-wide user interface behavior.<br /><br />The book closes with a look at some tools that make the application development life cycle easier to manage, particularly in a team environment, and more automatic.</p>
Table of Contents (21 chapters)
Apache Struts 2 Web Application Development
Credits
About the Author
Acknowledgement
About the Reviewers
Preface

Summary


This chapter delves into ActionSupport. It explains how ActionSupport, along with a few interfaces and a few Struts 2 tags, allows us to implement a fair amount of functionality. The chapter covers a bit about the I18N and validation support provided by ActionSupport.

The chapter also takes a quick took at a few other interfaces that provide access to scoped attributes (and if needed, direct access to request parameters). We can also access Servlet specification objects, such as the request and response, if we really need to.

All of these interfaces work in concert with interceptors, which we'll discuss in detail later. Even without in-depth knowledge of interceptors, we are already using them. And we could see that they're something worth paying attention to—much of Struts 2's functionality depends on them.

Next on our plate is more about Struts 2 results, including a look at the framework's default result types. We'll also look further at result configuration, type conversion, and...