- Paperback: 432 pages
- Publisher: Manning Publications; 1 edition (May 1, 2008)
- Language: English
- ISBN-10: 193398807X
- ISBN-13: 978-1933988078
- Product Dimensions: 7.4 x 0.9 x 9.2 inches
- Shipping Weight: 1.2 pounds (View shipping rates and policies)
- Average Customer Review: 33 customer reviews
- Amazon Best Sellers Rank: #425,912 in Books (See Top 100 in Books)
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Struts 2 in Action 1st Edition
Use the Amazon App to scan ISBNs and compare prices.
Fulfillment by Amazon (FBA) is a service we offer sellers that lets them store their products in Amazon's fulfillment centers, and we directly pack, ship, and provide customer service for these products. Something we hope you'll especially enjoy: FBA items qualify for FREE Shipping and Amazon Prime.
If you're a seller, Fulfillment by Amazon can help you increase your sales. We invite you to learn more about Fulfillment by Amazon .
See the Best Books of 2018 So Far
Looking for something great to read? Browse our editors' picks for the best books of the year so far in fiction, nonfiction, mysteries, children's books, and much more.
Customers who viewed this item also viewed
Customers who bought this item also bought
About the Author
Don Brown is the Technical Lead for Hosted Services at Atlassian Software Systems, with a background in the commercial and US Department of Defense sectors. He is a member of the Apache Software Foundation, and has been a Struts committer since 2003. He is also a committer on several Apache Commons projects and a frequent speaker at JavaOne, ApacheCon, and Java user groups.
Top customer reviews
There was a problem filtering reviews right now. Please try again later.
I found the book detailed and pretty complete. I'd say it's the only book you need and is still up-to-date for Struts 2.1 (2.3 had a problem with finding the default web page for the webroot/ so I went back to 2.1). The server side AJAX may be dated, so you may need some current examples for serving AJAX requests.
The whole book is very useful reading but I'd recommend reading the first 8 chapters first and reading the chapters on spring/hibernate, plugins, and Struts 1 migration only if you need it. There are plenty of odd features or tricks that need to be done a certain way that you will pick up by reading the whole book.
Some chapters are definitely better than others. The organization leaves something to be desired. I don't know how I would change it, but I found myself frequently searching for information sprinkled in different chapters before I was able to get enough of what I needed. I did read the first seven chapters twice with much more understanding on the second pass. There is a learning curve with using OGNL, and even reading in application properties (same as i18n - internationalization). One thing that isn't covered well is the use of the static ServletActionContext.getServletContext() when you don't have normal access through the class or a method parameter. This is accessible as ThreadLocal data to all code executing on the thread.
I found the information on customizing the default templates for components useful for changing or adding the horizontal layout of a radio button to a vertical layout. Though I didn't need it, there is an excellent example of reusable CRUD functionality that makes adding new CRUD data trivial, independent of your preferred form of database access.
The book should have given some info on deploying your first Struts 2 webapp in an early chapter. I think they assume you will just deploy their example war. I'd recommend downloading the examples from the Struts 2 website and using the struts2-blank webapp as the starting point for your webapp. It has all the needed jars and proper xml files for the Struts version you're using.
You will really learn Struts 2 by doing your first web app and it is somewhat of a struggle, but with this book's help and a full understanding of how the framework works to utilize its power, you can write a minimum of code and easily create powerful web apps.
There is definitely some bad information in the Struts documentation and lots of bad information on the internet on how to easily and properly use Struts 2. You really need to learn the fundamentals and best practices from the experts. I wouldn't even attempt Struts 2 development without a good book. You will be more than ready to create or maintain Struts 2 webapps with this book and a little experience. Obviously, that is a high recommendation.
Update: 28 Sep 2015
I easily upgraded my Struts 2.1 app to 2.3 and 2.5 with no changes to my app code. The latest GA release of 2.3.24 found the default page of the webroot just fine. To upgrade your Struts 2.1 app you just need to update the jars using the ones in the included blank war from 2.3. The 2.5-BETA1 is an easy upgrade from 2.3 but there was no blank war included. Just update the existing jars and remove the asm-tree-3.3.jar and xwork-core-184.108.40.206.jar. I had to update the web.xml, removing the old prepare and execute filter and add these two separate ones:
You should probably also update your struts.xml and your xml files it includes to the struts 2.3 dtd for struts 2.3 and 2.5:
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
1) This book is not for beginners. If you are new to Struts or Java web development, don't even bother.
2) The book seems to be a series of notes/references over a project that the author(s) put together. Normally this is OK, but:
3) Project source code is difficult to integrate into an IDE. There are no examples or exercises that involve updating the source code from the book's project...and on that note...
4). There is no guide or instructions on getting the book project up and running. The author(s) leave it up to the reader to set up a server, deploy the code, and import the project into an IDE. The instructions on how to do this are basically "figure it out for yourself". Any other programming book I have ever read has had explicit instructions on how to set up a project based on code that the book uses as examples / exercises.
That being said, this is basically a reference book, but not a good reference book. A good reference book is short and to the point. This book seems like it is trying to be a reference and an exercise book, but it fails at both. The online documentation and tutorials for Struts 2 give a lot more information with a lot less bloat. Do yourself a favor and check those out before buying this book.
One problem of the authors' style, however, is that they often use technical words, which they have not defined. For example they often refer to classpath, namespace, package etc. These words in the context of the Web application mean not exactly same as in core Java. However they are not defined in the book, and reader has to guess and deduce their meaning. For a textbook designed for new students, this problem is significant. Also words like maintainability and testability, beautiful and scientifically-sounding as they are, need some explanation. The authors are probably so much immersed in their technology that they forgot that some readers may be unacquainted with the subject.