Skip to main content

Professional Java for Web Applications

Professional Java for Web Applications

Nicholas S. Williams

ISBN: 978-1-118-90931-7 February 2014 936 Pages

 E-Book

$38.99

Description

The comprehensive Wrox guide for creating Java web applications for the enterprise

This guide shows Java software developers and software engineers how to build complex web applications in an enterprise environment. You'll begin with an introduction to the Java Enterprise Edition and the basic web application, then set up a development application server environment, learn about the tools used in the development process, and explore numerous Java technologies and practices. The book covers industry-standard tools and technologies, specific technologies, and underlying programming concepts.

  • Java is an essential programming language used worldwide for both Android app development and enterprise-level corporate solutions
  • As a step-by-step guide or a general reference, this book provides an all-in-one Java development solution
  • Explains Java Enterprise Edition 7 and the basic web application, how to set up a development application server environment, which tools are needed during the development process, and how to apply various Java technologies
  • Covers new language features in Java 8, such as Lambda Expressions, and the new Java 8 Date & Time API introduced as part of JSR 310, replacing the legacy Date and Calendar APIs
  • Demonstrates the new, fully-duplex WebSocket web connection technology and its support in Java EE 7, allowing the reader to create rich, truly interactive web applications that can push updated data to the client automatically
  • Instructs the reader in the configuration and use of Log4j 2.0, Spring Framework 4 (including Spring Web MVC), Hibernate Validator, RabbitMQ, Hibernate ORM, Spring Data, Hibernate Search, and Spring Security
  • Covers application logging, JSR 340 Servlet API 3.1, JSR 245 JavaServer Pages (JSP) 2.3 (including custom tag libraries), JSR 341 Expression Language 3.0, JSR 356 WebSocket API 1.0, JSR 303/349 Bean Validation 1.1, JSR 317/338 Java Persistence API (JPA) 2.1, full-text searching with JPA, RESTful and SOAP web services, Advanced Message Queuing Protocol (AMQP), and OAuth

Professional Java for Web Applications is the complete Wrox guide for software developers who are familiar with Java and who are ready to build high-level enterprise Java web applications.

Related Resources

Instructor

Request an Evaluation Copy for this title

Introduction xxiii

Part I: Creating Enterprise Applications

Chapter 1: Introducing Java Platform, Enterprise Edition 3

Chapter 2: Using Web Containers 19

Chapter 3: Writing Your First Servlet 41

Chapter 4: Using JSPs to Display Content 73

Chapter 5: Maintaining State Using Sessions 105

Chapter 6: Using the Expression Language in JSPs 143

Chapter 7: Using the Java Standard Tag Library 177

Chapter 8: Writing Custom Tag and Function Libraries 209

Chapter 9: Improving Your Application Using Filters 233

Chapter 10: Making Your Application Interactive wi th WebSockets 257

Chapter 11: Using Logging to Monitor Your Application 297

Part II: Adding Spring Framework Into the Mix

Chapter 12: Introducing Spring Framework 323

Chapter 13: Replacing Your Servlets with Controllers 355

Chapter 14: Using Services and Repositories to Support Your Controllers 389

Chapter 15: Internationalizing Your Application with Spring Framework i18n 417

Chapter 16: Using JSR 349, Spring Framework, and Hibernate Validator for Bean Validation 441

Chapter 17: Creating RESTful and SOA P Web Services 473

Chapter 18: Using Messaging and Clustering for Flexibility and Reliability 509

Part III: Persisting Data with JPA and Hibernate ORM

Chapter 19: Introducing Java Persistence API and Hibernate ORM 543

Chapter 20: Mapping Entities to Tables with JPA Annotations 565

Chapter 21: Using JPA in Spring Framework Repositories 597

Chapter 22: Eliminating Boilerplate Repositories with Spring Data JPA 633

Chapter 23: Searching for Data with JPA and Hibernate Search 663

Chapter 24: Creating Advanced Mappi ngs and Custom Data Types 693

Part IV: Securing Your Application wi th Spring Security

Chapter 25: Introducing Spring Security 729

Chapter 26: Authenticating Users with Spring Security 747

Chapter 27: Using Authorization Tags and Annotations 779

Chapter 28: Securing RESTful Web Services with OAuth 815

Summary 862

Index 865

ReadMe
Download
Full Code Download
Updated on 9/4/14.
Download
Chapter 2
Updated on 9/4/14.
Download
Chapter 3
Updated on 9/4/14.
Download
Chapter 4
Updated on 9/4/14.
Download
Chapter 5
Updated on 9/4/14.
Download
Chapter 6
Updated on 9/4/14.
Download
Chapter 7
Updated on 9/4/14.
Download
Chapter 8
Updated on 9/4/14.
Download
Chapter 9
Updated on 9/4/14.
Download
Chapter 10
Updated on 9/4/14.
Download
Chapter 11
Updated on 9/4/14.
Download
Chapter 12
Updated on 9/4/14.
Download
Chapter 13
Updated on 9/4/14.
Download
Chapter 14
Updated on 9/4/14.
Download
Chapter 15
Updated on 9/4/14.
Download
Chapter 16
Updated on 9/4/14.
Download
Chapter 17
Updated on 9/4/14.
Download
Chapter 18
Updated on 9/4/14.
Download
Chapter 20
Updated on 9/4/14.
Download
Chapter 21
Updated on 9/4/14.
Download
Chapter 22
Updated on 9/4/14.
Download
Chapter 23
Updated on 9/4/14.
Download
Chapter 24
Updated on 9/4/14.
Download
Chapter 26
Updated on 9/4/14.
Download
Chapter 27
Updated on 9/4/14.
Download
Chapter 28
Updated on 9/4/14.
Download
ChapterPageDetailsDatePrint Run
17Text Correction
Fourth sentence of the third paragraph under "The Era of the Name Changes"
Currently Reads:
"Whenever you see the terms J2SE or Java SE, they are interchangeable, and the preferred and accepted name today is Java EE."
It should read:
"Whenever you see the terms J2SE or Java SE, they are interchangeable, and the preferred and accepted name today is Java SE."
10/02/14

45Text Correction
The last sentence of page:
Currently reads:
"Because it is called immediately upon undeployment or shutdown, you do not have to wait for garage collection to trigger the finalizer before cleaning up resources such as"
It should read:
"Because it is called immediately upon undeployment or shutdown, you do not have to wait for garbage collection to trigger the finalizer before cleaning up resources such as"
10/02/14

371Text Correction: Error in Code
Currently reads:
TICKED_IT_SEQUENCE
should read:
TICKET_ID_SEQUENCE
12/4/14

119Text Correction
The default case in the last code snippet on page:
Currently reads:
case ?browser?:
default:
It should read:
case "browse":
default:
10/02/14

148Text Correction
The last sentence of the first paragraph under "Reserved Keywords":
Currently reads:
"Variables, properties, and methods should have names equal to these reserved words."
It should read:
"Variables, properties, and methods should not have names equal to these reserved words."
10/02/14

169Text Correction
The second sentence of the first paragraph under "Transforming the Stream"
Currently reads:
"The map operation accepts a mapper that expects one type of element and returns a number."
It should read:
"The map operation accepts a mapper that expects one type of element and returns a different type of element."
10/02/14

12343Text Correction
Currently Reads:
@javax.annotation.PostContstruct
Should Read:
@javax.annotation.PostConstruct
12/4/14

14394Text Correction
Currently Reads:
two principals
Should Read:
two principles
12/4/14

17Text Correction
Currently Reads:
Whenever you see the terms J2SE or Java SE, they are interchangeable, and the preferred and accepted name today is Java EE.
Should read:
Whenever you see the terms J2SE or Java SE, they are interchangeable, and the preferred and accepted name today is Java SE.
12/4/14

571Text Correction
Currently Reads:
"...you don't have to employee triggers..."
Should Read:
"...you don't have to employ triggers..."
12/19/14

Text Correction
As of the July 2014 release of Log4j 2.0, the org.apache.logging.log4j.ThreadContext method previously named "clear" has been renamed to "clearAll." When published, this book used the then-current name, "clear," because Log4j had not been released yet. All sample code available for download has been updated to use the new method named "clearAll." Additionally, wherever the ThreadContext method named "clear" is used in the text, it should say "clearAll."
12/19/14

76Text Correction: Error in Code
Step 1 and step 2:
Currently reads:
"hello-world"
Should read:
"hello-world-jsp"
01/07/14

234Text Correction
(Logging Filters):

Currently reads:
applications developers
Should read:
application developers
01/07/14

20Text Correction: Error in Code
In the sample code for Chapter 20, Lines 4 and 5 should be removed from the file /web/WEB-INF/jsp/base.jspf in the Entity-Mappings and Enums-Dates-Lobs projects for IntelliJ and Eclipse.
04/02/15

67Errata in Code
The code that appears at the top of that page should be:

            case "download":
                this.downloadAttachment(request, response);
                break;
            case "list":
            default:
                this.listTickets(request, response);
                break;
        }
    }

16-Jan-16

96Errata in Text
Paragraph 4 currently reads:
"output any white space only text"

Should Read:
"output any whitespace-only text."
16-Jan-16

134Errata in Text
Paragraph 2 currently reads:

"@WebServlet is not the only way to notify the container..."

Should read:

"@WebListener is not the only way to notify the container..."
16-Jan-16