Contents
Chapter 1: Introducing Java Web Development
Languages Designed for the JVM
Setting Up the Development Environment
Creating and Running Your First Java Application
Developing Java Applications with an IDE
Data Model for the Bookstore Application
Data Access Layer for the Bookstore Application
Client for the Data Access Layer
Trends and Technologies in the Java Web Landscape
Single-Page Web Application (SPA)
Chapter 2: Building Web Applications Using Servlets and JSP
Your First Web Application Using a Servlet
ServletContext and ServletConfig
Configuring Servlet via Annotations
Your First Web Application Using JSP
Searching the Books by Category
Searching the Books by Keyword
Chapter 3: Best Practices in Java EE Web Development
Best-Practice Solutions: Using EL and JSTL
Best-Practice Solutions: Using Patterns
Chapter 4: Building a Web Application Using Struts 2
Integrating the Data Access Layer
Chapter 5: Building Java Web Applications with Spring Web MVC
Key Objectives of the Spring Framework
Dealing with Tight Coupling Using Dependency Injection
Addressing Cross-Cutting Concerns Using AOP
Removing Boilerplate Code Using Templates
Building Web Application with Spring Web MVC
Getting Started with a Spring Web MVC Application
Implementing Spring Web MVC in the Bookstore Application
Working with Forms Using Annotations
Chapter 6: Component-Based Web Development Using JSF 2
Life Cycle of a JSF Application
Building the Bookstore Application Using JSF 2
Integrating JSF with Spring Framework
Accessing a Database from the Web Layer via Spring JDBCTemplate
Developing the User Interface Using UI Components and JSF EL
Chapter 7: Rapid Web Development with Grails
Creating the Bookstore Application
Chapter 8: Play with Java and Scala
Hello World Java Application with Play
Helloworld Scala Application with Play 2
A Basic CRUD Play 2 Java Application
Creating the Controller and Actions
The Form and the View Template
Appendix A: Introduction to Java
Appendix B: Introduction to Groovy
Explicit Declaration of Closure
Reusing the Method as a Closure
Passing a Closure as a Parameter
Safe Navigation/Dereference Operator
Appendix C: Introduction to Scala
Using the Interactive Interpreter