Web development is still one of today's most popular, active, and important programming and development activities. From a single web page to an e-commerce-enabled web site to a fully-fledged web application, the Java programming language and its frameworks allow you great flexibility and productivity for your web application development. Learn Java for Web Development teaches web developers who are new to Java key skills, Java-based languages, and frameworks to build simple or complex web sites and applications. As soon as you pick up this book, Vishal Layka's experience guides you on a very practical learning and building journey. You will learn the Java nuts and bolts necessary to build a simple "HelloWorld" Java (native) application, as well as a "HelloWorld" Java-based web application example that utilizes servlets and Java Server Pages (JSPs). Over the course of the book, you'll learn more about servlets and JSPs and delve into Java Server Faces (JSFs) and the expression language found in each of these by applying them in a real-world case study—a book store e-commerce application. Then you’ll build your web application using Apache Struts2 and the Spring MVC framework. The book concludes by exploring the web application that you've built and examining industry best practices and how these might fit with your application, as well as covering alternative Java Web frameworks like Groovy/Grails and Scala/Play 2. You also can explore the basics of Java, Groovy, and Scala in the book’s appendices. While reading this book, you'll see all this in action and you can use it as a starting point for further Java web development. Study and experiment with the many source code examples, and later apply them to your own web application building endeavors and 2:00 AM challenges. This book is for current or aspiring web developers who have some programming experience, but have no or little prior experience using the Java programming language and the available frameworks for Java in web development.
I already had some basic prior experience with servlets. But since the spec has changed considerably from when I first read a JEE book and I've forgotten a pretty decent amount of the machinery required, I picked up this one. Everything went well until I reached the webapp servlet example for bookstore project. The book contains just fragments of jsp and servlet files. So I searched the book's website for the complete project. Copy'd the needed files, and when I ran the thing inside Eclipse, it threw me a SQLException because it couldn't find the database driver I had setup correctly from previous project (command line java app, that used the same connectionfactory class).
The source code is badly formatted (as someone pointed out at Amazon). The author leaves important pieces of code missing (like two search methods inside the BookController servlet that are called, but not implemented -- this is chapter 2).
The first chapter was good but after that it was a book with some unclear code fragments. I could not even find the full code download in the publisher's website. I stopped reading it after the first 100 pages. Maybe it is a good book for web developers but not for newcomers who know Java SE.