Struts: The Complete Reference, 2nd Edition
Struts is a web framework for Java EE applications. Currently not used so frequently as before, still has it share in legacy business applications. If you are willing to start working with Struts, this book probably will be just for you.
“Struts: The Complete Reference 2nd edition” describes Struts in version up to 1.3. The book consist of two main parts – tutorial and reference. In tutorial part the author introduces readers to the subject in well organized way by presenting small steps of evolution of real-life application (for HR department). In reference part each framework API part is presented in detailed manner so you can easy find tag description and usage examples for it.
Inside the book you will find a lot of example code in form of short examples, which can be downloaded for free from book’s website (see below).
What I found unique in this book is that it’s model examples were based of in-memory data which can be annoying or very useful depending on your needs. For me this way was better as I could run these examples without configuring any database, but I can imagine some of readers could find code using database (at least Derby) more useful.
The book is rather old, but if you have to work with Struts 1.x, it’s not so much outdated as you could think. It just describes Struts, so if you need to integrate this framework with more recent technologies, code examples you can find inside are still useful even today.
What You Will Learn
Large part of this book (almost half of it) presents reference information related to Struts 1.3. Other parts, in tutorial-like form introduce the following subjects:
- Struts-based project architecture & required components
- using Apache Commons BeanUtils for easy property copying
- model construction: in-memory example (using Service pattern)
- controller: how to implement it using Struts’ actions
- view: JSP & Struts’ forms, including dynamic forms
- exception handling
- internationalization (I18N)
- security: various types of login pages, page filtering based on user role, SSL integration
- testing Struts:
- unit testing: Cactus, JUnit, HttpUnit, Canoo Webtest
- performance testing: JUnitPerf, JMeter
- using scripts with Struts, Groovy example
- JSF integration
The book is rather fat (528 pages), but you can skip reference information during first read (and use it later).
To summarize, if you have to work with Struts 1.x, you will have problems finding better and more detailed book describing this framework.
Book home page: Struts: The Complete Reference, 2nd Edition.
* detailed presentation of Struts 1.3 features
* teaches how to test application using various tools
* well-organized reference information
* fat (528 pages), but this includes reference information, so don't worry