Muutke küpsiste eelistusi

E-raamat: Java EE 8 Recipes: A Problem-Solution Approach

  • Formaat: PDF+DRM
  • Ilmumisaeg: 11-Jun-2018
  • Kirjastus: APress
  • Keel: eng
  • ISBN-13: 9781484235942
  • Formaat - PDF+DRM
  • Hind: 86,44 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Lisa ostukorvi
  • Lisa soovinimekirja
  • See e-raamat on mõeldud ainult isiklikuks kasutamiseks. E-raamatuid ei saa tagastada.
  • Formaat: PDF+DRM
  • Ilmumisaeg: 11-Jun-2018
  • Kirjastus: APress
  • Keel: eng
  • ISBN-13: 9781484235942

DRM piirangud

  • Kopeerimine (copy/paste):

    ei ole lubatud

  • Printimine:

    ei ole lubatud

  • Kasutamine:

    Digitaalõiguste kaitse (DRM)
    Kirjastus on väljastanud selle e-raamatu krüpteeritud kujul, mis tähendab, et selle lugemiseks peate installeerima spetsiaalse tarkvara. Samuti peate looma endale  Adobe ID Rohkem infot siin. E-raamatut saab lugeda 1 kasutaja ning alla laadida kuni 6'de seadmesse (kõik autoriseeritud sama Adobe ID-ga).

    Vajalik tarkvara
    Mobiilsetes seadmetes (telefon või tahvelarvuti) lugemiseks peate installeerima selle tasuta rakenduse: PocketBook Reader (iOS / Android)

    PC või Mac seadmes lugemiseks peate installima Adobe Digital Editionsi (Seeon tasuta rakendus spetsiaalselt e-raamatute lugemiseks. Seda ei tohi segamini ajada Adober Reader'iga, mis tõenäoliselt on juba teie arvutisse installeeritud )

    Seda e-raamatut ei saa lugeda Amazon Kindle's. 

Quickly find solutions to dozens of common programming problems with the Java Enterprise Edition Platform for small business web applications, enterprise database applications, and microservices solutions. Content is presented in the popular problem-solution format. Look up the programming problem that you want to solve. Read the solution. Apply the solution directly in your own code. Problem solved!

Java EE 8 Recipes provides you with effective and proven solutions that can be used to accomplish just about any task that you may encounter. You can feel confident using the reliable solutions that are demonstrated in this book in your personal or corporate environment.

Java is a mature programming language that has been refined over the years into a productive and lucrative language for those with the skills to wield it. One result of this years-long refining process is that that the language carries forward many older feature sets that no longer represent the best way of getting work accomplished. You can rest assured that Java EE 8 Recipes provides solutions using the most current approaches implemented in the most current Java Enterprise technologies, including JSON-P 1.1, JSF 2.3, and JAX-RS 2.1. 

Build a streamlined and reliable application that uses the latest in Java technologies, and develop it much faster than you did with the older technologies. Rejuvenate your Java expertise to use the freshest capabilities, or perhaps learn Java Enterprise development for the first time and discover one of the most widely used and most powerful technologies available for application development today. Develop productively. Develop with proven technology. Develop with Java Enterprise Edition. The book: 

  • Teaches how to develop RESTful enterprise applications quickly using the most current Java EE technologies
  • Explores different solutions for developing sophisticated web user interfaces
  • Walks you through a myriad of different concepts to apply while working with databases using Java technologies
What You'll Learn
  • Develop Java Enterprise applications using the latest in Java EE technologies
  • Build great-looking user interfaces using Java Server Faces
  • Employ Java Servlet technology and standard frameworks in developing professional web applications
  • Create enterprise-level database applications using Enterprise Java Beans and JAX-RS RESTFul web services
  • Make use of Arquillian to build a cohesive test suite for Java EE applications
  • Manage Java EE application security through Java EE's container feature set
Who This Book Is For

Java developers who want to develop effective and proven solutions without reading a lengthy manual and scrubbing for techniques. A beginning Java programmer will find the book handy for learning a variety of different solutions for the platform, while advanced developers will enjoy the ease of the problem-solution approach to quickly broaden their knowledge of the platform’s latest technologies.



Tagline: Proven solutions for Java Enterprise Edition 8 Development
About the Author xxxix
About the Technical Reviewer xli
Acknowledgments xliii
Introduction xlv
Chapter 1 Working with Servlets 1(58)
1.1 Setting Up a Java Enterprise Environment
2(2)
Problem
2(1)
Solution #1
2(1)
Solution #2
3(1)
How It Works
3(1)
1.2 Developing a Servlet
4(5)
Problem
4(1)
Solution
4(3)
How It Works
7(2)
1.3 Packaging, Compiling, and Deploying a Servlet
9(2)
Problem
9(1)
Solution
9(1)
How It Works
10(1)
1.4 Registering Servlets Without WEB-XML
11(3)
Problem
11(1)
Solution
11(2)
How It Works
13(1)
1.5 Displaying Dynamic Content with a Servlet
14(3)
Problem
14(1)
Solution
14(2)
How It Works
16(1)
1.6 Handling Requests and Responses
17(3)
Problem
17(1)
Solution
17(2)
How It Works
19(1)
1.7 Listening for Servlet Container Events
20(3)
Problem
20(1)
Solution
20(2)
How It Works
22(1)
1.8 Setting Initialization Parameters
23(2)
Problem
23(1)
Solution #1
23(1)
Solution #2
24(1)
How It Works
24(1)
1.9 Filtering Web Requests
25(2)
Problem
25(1)
Solution
25(1)
How It Works
26(1)
1.10 Listening for Attribute Changes
27(3)
Problem
27(1)
Solution
27(2)
How It Works
29(1)
1.11 Applying a Listener to a Session
30(2)
Problem
30(1)
Solution
30(1)
How It Works
31(1)
1.12 Managing Session Attributes
32(2)
Problem
32(1)
Solution
32(2)
How It Works
34(1)
1.13 Downloading a File
34(4)
Problem
34(1)
Solution
34(3)
How It Works
37(1)
1.14 Dispatching Requests
38(5)
Problem
38(1)
Solution
38(4)
How It Works
42(1)
1.15 Redirecting to a Different Site
43(1)
Problem
43(1)
Solution
43(1)
How It Works
43(1)
1.16 Securely Maintaining State Within the Browser
44(4)
Problem
44(1)
Solution
44(3)
How It Works
47(1)
1.17 Finalizing Servlet Tasks
48(1)
Problem
48(1)
Solution
48(1)
How It Works
49(1)
1.18 Reading and Writing with Nonblocking I/O
49(7)
Problem
49(1)
Solution
49(5)
How It Works
54(2)
1.19 Pushing Resources from a Server to a Client
56(3)
Problem
56(1)
Solution
56(1)
How It Works
57(2)
Chapter 2 JavaServer Pages 59(44)
2.1 Creating a Simple JSP Page
60(2)
Problem
60(1)
Solution
60(1)
How It Works
61(1)
2.2 Embedding Java into a JSP Page
62(2)
Problem
62(1)
Solution
62(1)
How It Works
63(1)
2.3 Separating Business Logic from View Code
64(3)
Problem
64(1)
Solution
64(2)
How It Works
66(1)
2.4 Yielding or Setting Values
67(3)
Problem
67(1)
Solution
67(1)
How It Works
68(2)
2.5 Invoking a Function in a Conditional Expression
70(4)
Problem
70(1)
Solution
70(2)
How It Works
72(2)
2.6 Creating a JSP Document
74(2)
Problem
74(1)
Solution
74(1)
How It Works
75(1)
2.7 Embedding Expressions in EL
76(5)
Problem
76(1)
Solution
76(2)
How It Works
78(3)
2.8 Accessing Parameters in Multiple Pages
81(2)
Problem
81(1)
Solution
81(1)
How It Works
82(1)
2.9 Creating a Custom JSP Tag
83(4)
Problem
83(1)
Solution
83(3)
How It Works
86(1)
2.10 Including Other JSPs into a Page
87(2)
Problem
87(1)
Solution
87(1)
How It Works
88(1)
2.11 Creating an Input Form for a Database Record
89(5)
Problem
89(1)
Solution
89(3)
How It Works
92(2)
2.12 Looping Through Database Records Within a Page
94(4)
Problem
94(1)
Solution
94(3)
How It Works
97(1)
2.13 Handling JSP Errors
98(2)
Problem
98(1)
Solution
98(1)
How It Works
99(1)
2.14 Disabling Scriptlets in Pages
100(1)
Problem
100(1)
Solution
100(1)
How It Works
101(1)
2.15 Ignoring EL in Pages
101(2)
Problem
101(1)
Solution #1
101(1)
Solution #2
101(1)
Solution #3
101(1)
How It Works
102(1)
Chapter 3 The Basics of JavaServer Faces 103(88)
3.1 Writing a Simple JSF Application
104(6)
Problem
104(1)
Solution #1
104(3)
Solution #2
107(1)
How It Works
108(2)
3.2 Writing a Controller Class
110(7)
Problem
110(1)
Solution
110(5)
How It Works
115(2)
3.3 Building Sophisticated JSF Views with Components
117(8)
Problem
117(1)
Solution
117(6)
How It Works
123(2)
3.4 Displaying Messages in JSF Pages
125(4)
Problem
125(1)
Solution
125(2)
How It Works
127(2)
3.5 Updating Messages Without Recompiling
129(2)
Problem
129(1)
Solution
129(2)
How It Works
131(1)
3.6 Navigating Based Upon Conditions
131(7)
Problem
131(1)
Solution
131(5)
How It Works
136(2)
3.7 Validating User Input
138(6)
Problem
138(1)
Solution
138(4)
How It Works
142(2)
3.8 Evaluating Page Expressions Immediately
144(2)
Problem
144(1)
Solution
144(2)
How It Works
146(1)
3.9 Passing Page Parameters to Methods
146(4)
Problem
146(1)
Solution
146(4)
How It Works
150(1)
3.10 Using Operators and Reserved Words in Expressions
150(4)
Problem
150(1)
Solution
150(2)
How It Works
152(2)
3.11 Creating Bookmarkable URLs
154(2)
Problem
154(1)
Solution
154(1)
How It Works
155(1)
3.12 Displaying Lists of Objects
156(5)
Problem
156(1)
Solution
156(4)
How It Works
160(1)
3.13 Developing with HTML5
161(2)
Problem
161(1)
Solution
161(1)
How It Works
162(1)
3.14 Creating Page Templates
163(5)
Problem
163(1)
Solution
163(1)
How It Works
164(4)
3.15 Applying Templates
168(9)
Problem
168(1)
Solution
168(7)
How It Works
175(2)
3.16 Adding Resources into the Mix
177(4)
Problem
177(1)
Solution
178(2)
How It Works
180(1)
3.17 Handling Variable-Length Data
181(7)
Problem
181(1)
Solution
181(2)
How It Works
183(5)
3.18 Invoking Controller Class Actions on Lifecycle Phase Events
188(3)
Problem
188(1)
Solution
188(1)
How It Works
188(3)
Chapter 4 JavaServer Faces Standard Components 191(52)
Component and Tag Primer
191(5)
Common Component Tag Attributes
194(1)
Common JavaScript Component Tags
194(1)
Binding Components to Properties
195(1)
4.1 Creating an Input Form
196(5)
Problem
196(1)
Solution
196(3)
How It Works
199(2)
4.2 Invoking Actions from Within a Page
201(5)
Problem
201(1)
Solution
201(3)
How It Works
204(2)
4.3 Displaying Output
206(7)
Problem
206(1)
Solution
206(3)
How It Works
209(4)
4.4 Adding Form Validation
213(6)
Problem
213(1)
Solution #1
213(1)
Solution #2
214(1)
Solution #3
214(2)
How It Works
216(3)
4.5 Adding Select Lists to Pages
219(4)
Problem
219(1)
Solution
219(2)
How It Works
221(2)
4.6 Adding Graphics to Your Pages
223(1)
Problem
223(1)
Solution
223(1)
How It Works
223(1)
4.7 Adding Check Boxes to a View
224(5)
Problem
224(1)
Solution
224(3)
How It Works
227(2)
4.8 Adding Radio Buttons to a View
229(2)
Problem
229(1)
Solution
229(1)
How It Works
230(1)
4.9 Displaying a Collection of Data
231(8)
Problem
231(1)
Solution
231(5)
How It Works
236(3)
4.10 Utilizing Custom JSF Component Libraries
239(1)
Problem
239(1)
Solution
239(1)
How It Works
239(1)
4.11 Implementing File Uploading
240(3)
Problem
240(1)
Solution
240(1)
How It Works
240(3)
Chapter 5 Advanced JavaServer Faces and Ajax 243(70)
5.1 Validating Input with Ajax
244(7)
Problem
244(1)
Solution
244(4)
How It Works
248(3)
5.2 Submitting Pages Without Page Reloads
251(1)
Problem
251(1)
Solution
251(1)
How It Works
251(1)
5.3 Making Partial-Page Updates
252(1)
Problem
252(1)
Solution
252(1)
How It Works
253(1)
5.4 Applying Ajax Functionality to a Group of Components
253(5)
Problem
253(1)
Solution
253(4)
How It Works
257(1)
5.5 Custom Processing of Ajax Functionality
258(2)
Problem
258(1)
Solution
258(2)
How It Works
260(1)
5.6 Custom Conversion of Input Values
260(4)
Problem
260(1)
Solution
261(1)
How It Works
262(2)
5.7 Maintaining Managed Bean Scopes for a Session
264(10)
Problem
264(1)
Solution
264(9)
How It Works
273(1)
5.8 Listening for System-Level Events
274(2)
Problem
274(1)
Solution
274(2)
How It Works
276(1)
5.9 Listening for Component Events
276(2)
Problem
276(1)
Solution
276(1)
How It Works
277(1)
5.10 Invoking a Managed Bean Action on Render
278(2)
Problem
278(1)
Solution
278(1)
How It Works
279(1)
5.11 Asynchronously Updating Components
280(3)
Problem
280(1)
Solution
280(3)
How It Works
283(1)
5.12 Developing JSF Components Containing HTML5
283(3)
Problem
283(1)
Solution
283(2)
How It Works
285(1)
5.13 Listening to JSF Phases
286(2)
Problem
286(1)
Solution
286(2)
How It Works
288(1)
5.14 Adding Auto-Completion to Text Fields
288(3)
Problem
288(1)
Solution
288(2)
How It Works
290(1)
5.15 Developing Custom Constraint Annotations
291(4)
Problem
291(1)
Solution
291(2)
How It Works
293(2)
5.16 Developing a Page Flow
295(6)
Problem
295(1)
Solution
295(3)
How It Works
298(3)
5.17 Constructing a JSF View in Pure HTML5
301(1)
Problem
301(1)
Solution
301(1)
How It Works
302(1)
5.18 Invoking Server-Side Methods via Ajax
302(3)
Problem
302(1)
Solution
303(2)
How It Works
305(1)
5.19 Broadcasting Messages from the Server to All Clients
305(3)
Problem
305(1)
Solution
306(1)
How It Works
307(1)
5.20 Programmatically Searching for Components
308(5)
Problem
308(1)
Solution #1
308(1)
Solution #2
309(1)
How It Works
310(3)
Chapter 6 The MVC Framework 313(32)
6.1 Configuring an Application for the MVC Framework
314(3)
Problem
314(1)
Solution
314(2)
How It Works
316(1)
6.2 Making Data Available for the Application
317(10)
Problem
317(1)
Solution #1
317(4)
Solution #2
321(5)
How It Works
326(1)
6.3 Writing a Controller Class
327(3)
Problem
327(1)
Solution
327(1)
How It Works
328(2)
6.4 Using a Model to Expose Data to a View
330(2)
Problem
330(1)
Solution
330(2)
How It Works
332(1)
6.5 Utilizing CDI for Exposing Data
332(3)
Problem
332(1)
Solution
332(2)
How It Works
334(1)
6.6 Supplying Message Feedback to the User
335(3)
Problem
335(1)
Solution
335(2)
How It Works
337(1)
6.7 Inserting and Updating Data
338(2)
Problem
338(1)
Solution
338(1)
How It Works
339(1)
6.8 Applying a Different View Engine
340(5)
Problem
340(1)
Solution #1
341(1)
Solution #2
341(2)
How It Works
343(2)
Chapter 7 JDBC 345(50)
7.1 Obtaining Database Drivers and Adding Them to the CLASSPATH
346(1)
Problem
346(1)
Solution
346(1)
How It Works
346(1)
7.2 Connecting to a Database
347(5)
Problem
347(1)
Solution #1
347(1)
Solution #2
348(3)
How It Works
351(1)
7.3 Handling Database Connection Exceptions
352(1)
Problem
352(1)
Solution
353(1)
How It Works
353(1)
7.4 Simplifying Connection Management
353(5)
Problem
353(1)
Solution
354(3)
How It Works
357(1)
7.5 Querying a Database
358(2)
Problem
358(1)
Solution
358(1)
How It Works
359(1)
7.6 Performing CRUD Operations
360(3)
Problem
360(1)
Solution
360(2)
How It Works
362(1)
7.7 Preventing SQL Injection
363(7)
Problem
363(1)
Solution
364(3)
How It Works
367(3)
7.8 Utilizing Java Objects for Database Access
370(6)
Problem
370(1)
Solution
370(6)
How It Works
376(1)
7.9 Navigating Data with Scrollable ResultSets
376(3)
Problem
376(1)
Solution
377(1)
How It Works
378(1)
7.10 Calling PL/SQL Stored Procedures
379(1)
Problem
379(1)
Solution
379(1)
How It Works
380(1)
7.11 Querying and Storing Large Objects
380(4)
Problem
380(1)
Solution
381(2)
How It Works
383(1)
7.12 Caching Data for Use When Disconnected
384(5)
Problem
384(1)
Solution
384(3)
How It Works
387(2)
7.13 Joining RowSet Objects When Not Connected to the Data Source
389(4)
Problem
389(1)
Solution
389(3)
How It Works
392(1)
7.14 Querying with a REF_CURSOR
393(2)
Problem
393(1)
Solution
394(1)
How It Works
394(1)
Chapter 8 Object-Relational Mapping 395(46)
8.1 Creating an Entity
396(4)
Problem
396(1)
Solution
396(3)
How It Works
399(1)
8.2 Mapping Data Types
400(3)
Problem
400(1)
Solution
401(1)
How It Works
402(1)
8.3 Creating a Persistence Unit
403(3)
Problem
403(1)
Solution
403(1)
How It Works
404(2)
8.4 Using Database Sequences to Create Primary Key Values
406(4)
Problem
406(1)
Solution
406(2)
How It Works
408(2)
8.5 Generating Primary Keys Using More Than One Attribute
410(8)
Problem
410(1)
Solution #1
410(3)
Solution #2
413(3)
How It Works
416(2)
8.6 Defining a One-to-One Relationship
418(2)
Problem
418(1)
Solution
418(2)
How It Works
420(1)
8.7 Defining One-to-Many and Many-to-One Relationships
420(4)
Problem
420(1)
Solution
421(1)
How It Works
422(2)
8.8 Defining a Many-to-Many Relationship
424(4)
Problem
424(1)
Solution
424(2)
How It Works
426(2)
8.9 Querying with Named Queries
428(1)
Problem
428(1)
Solution
428(1)
How It Works
429(1)
8.10 Performing Validation on Entity Fields
429(3)
Problem
429(1)
Solution
430(1)
How It Works
431(1)
8.11 Generating Database Schema Objects Automatically
432(4)
Problem
432(1)
Solution
432(1)
How It Works
432(4)
8.12 Mapping Date-Time Values
436(1)
Problem
436(1)
Solution
436(1)
How It Works
437(1)
8.13 Using the Same Annotation Many Times
437(4)
Problem
437(1)
Solution
438(1)
How It Works
439(2)
Chapter 9 Enterprise JavaBeans 441(38)
9.1 Obtaining an Entity Manager
441(2)
Problem
441(1)
Solution #1
442(1)
Solution #2
442(1)
How It Works
442(1)
9.2 Developing a Stateless Session Bean
443(6)
Problem
443(1)
Solution #1
443(1)
Solution #2
444(3)
How It Works
447(2)
9.3 Developing a Stateful Session Bean
449(6)
Problem
449(1)
Solution
449(4)
How It Works
453(2)
9.4 Utilizing Session Beans with JSF
455(4)
Problem
455(1)
Solution
455(2)
How It Works
457(2)
9.5 Persisting an Object
459(1)
Problem
459(1)
Solution
459(1)
How It Works
459(1)
9.6 Updating an Object
460(1)
Problem
460(1)
Solution
460(1)
How It Works
460(1)
9.7 Returning Data to Display in a Table
460(4)
Problem
460(1)
Solution #1
461(1)
Solution #2
462(1)
How It Works
463(1)
9.8 Creating a Singleton Bean
464(4)
Problem
464(1)
Solution
465(2)
How It Works
467(1)
9.9 Scheduling a Timer Service
468(4)
Problem
468(1)
Solution #1
468(1)
Solution #2
468(1)
How It Works
469(3)
9.10 Performing Optional Transaction Lifecycle Callbacks
472(1)
Problem
472(1)
Solution
472(1)
How It Works
473(1)
9.11 Ensuring a Stateful Session Bean Is Not Passivated
473(1)
Problem
473(1)
Solution
473(1)
How It Works
474(1)
9.12 Denoting Local and Remote Interfaces
474(2)
Problem
474(1)
Solution
474(1)
How It Works
474(2)
9.13 Processing Messages Asynchronously from Enterprise Beans
476(3)
Problem
476(1)
Solution
476(1)
How It Works
477(2)
Chapter 10 The Query API and JPQL 479(28)
10.1 Querying All Instances of an Entity
479(3)
Problem
479(1)
Solution #1
479(1)
Solution #2
480(1)
How It Works
480(2)
10.2 Setting Parameters to Filter Query Results
482(2)
Problem
482(1)
Solution #1
482(1)
Solution #2
482(1)
How It Works
482(2)
10.3 Returning a Single Object
484(1)
Problem
484(1)
Solution
484(1)
How It Works
484(1)
10.4 Creating Native Queries
484(3)
Problem
484(1)
Solution #1
485(1)
Solution #2
485(1)
How It Works
486(1)
10.5 Querying More Than One Entity
487(4)
Problem
487(1)
Solution #1
487(1)
Solution #2
488(1)
How It Works
489(2)
10.6 Calling JPQL Aggregate Functions
491(1)
Problem
491(1)
Solution
491(1)
How It Works
492(1)
10.7 Invoking Database Stored Procedures Natively
492(1)
Problem
492(1)
Solution
492(1)
How It Works
493(1)
10.8 Joining to Retrieve Instances Matching All Cases
493(1)
Problem
493(1)
Solution
493(1)
How It Works
494(1)
10.9 Joining to Retrieve All Rows Regardless of Match
494(2)
Problem
494(1)
Solution
495(1)
How It Works
495(1)
10.10 Applying JPQL Functional Expressions
496(2)
Problem
496(1)
Solution
496(1)
How It Works
497(1)
10.11 Forcing Query Execution Rather Than Cache Use
498(1)
Problem
498(1)
Solution
498(1)
How It Works
498(1)
10.12 Performing Bulk Updates and Deletes
499(2)
Problem
499(1)
Solution
499(1)
How It Works
500(1)
10.13 Retrieving Entity Subclasses
501(1)
Problem
501(1)
Solution
501(1)
How It Works
502(1)
10.14 Joining with ON Conditions
502(2)
Problem
502(1)
Solution
502(1)
How It Works
503(1)
10.15 Processing Query Results with Streams
504(1)
Problem
504(1)
Solution
504(1)
How It Works
504(1)
10.16 Converting Attribute Data Types
505(2)
Problem
505(1)
Solution
505(1)
How It Works
506(1)
Chapter 11 Bean Validation 507(16)
11.1 Validating Fields with Built-In Constraints
508(2)
Problem
508(1)
Solution #1
508(1)
Solution #2
508(1)
How It Works
509(1)
11.2 Writing Custom Constraint Validators
510(2)
Problem
510(1)
Solution
510(2)
How It Works
512(1)
11.3 Validating at the Class Level
512(3)
Problem
512(1)
Solution
512(2)
How It Works
514(1)
11.4 Validating Parameters
515(1)
Problem
515(1)
Solution
515(1)
How It Works
515(1)
11.5 Constructor Validation
516(1)
Problem
516(1)
Solution
516(1)
How It Works
516(1)
11.6 Validating Return Values
517(1)
Problem
517(1)
Solution
517(1)
How It Works
517(1)
11.7 Defining a Dynamic Validation Error Message
518(1)
Problem
518(1)
Solution
518(1)
How It Works
518(1)
11.8 Manually Invoking Validator Engine
519(1)
Problem
519(1)
Solution
519(1)
How It Works
520(1)
11.9 Grouping Validation Constraints
520(3)
Problem
520(1)
Solution
520(2)
How It Works
522(1)
Chapter 12 Java EE Containers 523(36)
12.1 Installing GlassFish 5 or Payara 5 and Starting Up
523(1)
Problem
523(1)
Solution #1: GlassFish
523(1)
Solution #2: Payara
524(1)
How It Works
524(1)
12.2 Logging into the Administrative Console
524(6)
Problem
524(1)
Solution
525(1)
How It Works
526(4)
12.3 Changing the Administrator User Password
530(1)
Problem
530(1)
Solution #1
530(1)
Solution #2
530(1)
How It Works
531(1)
12.4 Deploying a WAR File
531(3)
Problem
531(1)
Solution #1
531(2)
Solution #2
533(1)
How It Works
533(1)
12.5 Adding a Database Resource
534(5)
Problem
534(1)
Solution
534(3)
How It Works
537(2)
12.6 Adding Forms-Based Authentication
539(6)
Problem
539(1)
Solution
539(5)
How It Works
544(1)
12.7 Deploying a Microservice to Payara Micro
545(8)
Problem
545(1)
Solution
545(6)
How It Works
551(2)
12.8 Packaging a Web Application with Payara Micro as an Executable JAR
553(1)
Problem
553(1)
Solution
553(1)
How It Works
554(1)
12.9 Deploying Payara Micro Apps on Docker
554(5)
Problem
554(1)
Solution
555(1)
How It Works
556(3)
Chapter 13 Contexts and Dependency Injection 559(32)
13.1 Injecting a Contextual Bean or Other Object
560(2)
Problem
560(1)
Solution
560(1)
How It Works
561(1)
13.2 Binding a Bean to a Web View
562(3)
Problem
562(1)
Solution
562(2)
How It Works
564(1)
13.3 Allocating a Specific Bean for Injection
565(3)
Problem
565(1)
Solution
565(2)
How It Works
567(1)
13.4 Determining the Scope of a Bean
568(3)
Problem
568(1)
Solution
568(2)
How It Works
570(1)
13.5 Injecting Non-Bean Objects
571(3)
Problem
571(1)
Solution
571(2)
How It Works
573(1)
13.6 Ignoring Classes
574(1)
Problem
574(1)
Solution #1
574(1)
Solution #2
574(1)
How It Works
575(1)
13.7 Disposing of Producer Fields
575(1)
Problem
575(1)
Solution
576(1)
How It Works
576(1)
13.8 Specifying an Alternative Implementation at Deployment Time
576(1)
Problem
576(1)
Solution
576(1)
How It Works
577(1)
13.9 Injecting a Bean and Obtaining Metadata
577(1)
Problem
577(1)
Solution
577(1)
How It Works
578(1)
13.10 Invoking and Processing Events
578(4)
Problem
578(1)
Solution
578(3)
How It Works
581(1)
13.11 Intercepting Method Invocations
582(3)
Problem
582(1)
Solution
582(2)
How It Works
584(1)
13.12 Bootstrapping Java SE Environments
585(1)
Problem
585(1)
Solution
585(1)
How It Works
586(1)
13.13 Enhancing Business Logic of a Method
586(5)
Problem
586(1)
Solution
586(2)
How It Works
588(3)
Chapter 14 Java Message Service 591(22)
14.1 Creating JMS Resources
592(4)
Problem
592(1)
Solution #1
592(2)
Solution #2
594(1)
How It Works
595(1)
14.2 Creating a Session
596(2)
Problem
596(1)
Solution
596(1)
How It Works
597(1)
14.3 Creating and Sending a Message
598(2)
Problem
598(1)
Solution #1
598(1)
Solution #2
599(1)
How It Works
599(1)
14.4 Receiving Messages
600(3)
Problem
600(1)
Solution #1
601(1)
Solution #2
602(1)
How It Works
602(1)
14.5 Filtering Messages
603(2)
Problem
603(1)
Solution
603(2)
How It Works
605(1)
14.6 Inspecting Message Queues
605(1)
Problem
605(1)
Solution
605(1)
How It Works
606(1)
14.7 Creating Durable Message Subscribers
606(5)
Problem
606(1)
Solution
606(4)
How It Works
610(1)
14.8 Delaying Message Delivery
611(2)
Problem
611(1)
Solution
611(1)
How It Works
611(2)
Chapter 15 RESTful Web Services 613(42)
15.1 Creating a JAX-WS Web Service Endpoint
615(7)
Problem
615(1)
Solution #1
615(2)
Solution #2
617(2)
How It Works
619(3)
15.2 Deploying a JAX-WS Web Service
622(1)
Problem
622(1)
Solution #1
622(1)
Solution #2
622(1)
Solution #3
623(1)
How It Works
623(1)
15.3 Consuming a JAX-WS Web Service via WSDL
623(2)
Problem
623(1)
Solution
623(1)
How It Works
624(1)
15.4 Consuming a JAX-WS Web Service via a Stand-Alone Application Client
625(2)
Problem
625(1)
Solution
625(1)
How It Works
626(1)
15.5 Integrating JAX-WS Web Services into a Java EE Project
627(3)
Problem
627(1)
Solution
627(2)
How It Works
629(1)
15.6 Developing a RESTful Web Service
630(5)
Problem
630(1)
Solution #1
630(1)
Solution #2
631(2)
How It Works
633(2)
15.7 Consuming and Producing with REST
635(3)
Problem
635(1)
Solution
635(2)
How It Works
637(1)
15.8 Writing a JAX-RS Client
638(5)
Problem
638(1)
Solution
638(1)
How It Works
639(4)
15.9 Filtering Requests and Responses
643(3)
Problem
643(1)
Solution
643(1)
How It Works
644(2)
15.10 Processing Long-Running Operations Asynchronously
646(3)
Problem
646(1)
Solution
646(1)
How It Works
647(2)
15.11 Pushing One-Way Asynchronous Updates from Servers
649(3)
Problem
649(1)
Solution
649(2)
How It Works
651(1)
15.12 Receiving Server Sent Events as a Client
652(3)
Problem
652(1)
Solution
652(1)
How It Works
653(2)
Chapter 16 WebSockets and JSON 655(18)
16.1 Creating a WebSocket Endpoint
655(1)
Problem
655(1)
Solution
655(1)
How It Works
656(1)
16.2 Sending Messages to a WebSocket Endpoint
656(4)
Problem
656(1)
Solution
656(2)
How It Works
658(2)
16.3 Building a JSON Object
660(2)
Problem
660(1)
Solution
660(1)
How It Works
661(1)
16.4 Writing a JSON Object to Disk
662(1)
Problem
662(1)
Solution
662(1)
How It Works
662(1)
16.5 Reading JSON from an Input Source
663(1)
Problem
663(1)
Solution
663(1)
How It Works
663(1)
16.6 Converting Between JSON and Java Objects
664(3)
Problem
664(1)
Solution
664(2)
How It Works
666(1)
16.7 Custom Mapping with JSON-B
667(2)
Problem
667(1)
Solution
667(1)
How It Works
668(1)
16.8 Replacing a Specified Element in a JSON Document
669(4)
Problem
669(1)
Solution
669(1)
How It Works
670(3)
Chapter 17 Security 673(36)
17.1 Setting Up Application Users and Groups in GlassFish
674(3)
Problem
674(1)
Solution
674(2)
How It Works
676(1)
17.2 Performing Basic Web Application Authorization
677(4)
Problem
677(1)
Solution #1
677(1)
Solution #2
678(1)
How It Works
679(2)
17.3 Developing a Programmatic Login Form with Custom Authentication Validation
681(14)
Problem
681(1)
Solution
681(13)
How It Works
694(1)
17.4 Authenticating with the Security API Using Database Credentials
695(7)
Problem
695(1)
Solution
695(5)
How It Works
700(2)
17.5 Managing Page Access Within a JSF Application
702(2)
Problem
702(1)
Solution
702(1)
How It Works
703(1)
17.6 Configuring LDAP Authentication Within GlassFish
704(2)
Problem
704(1)
Solution
704(2)
How It Works
706(1)
17.7 Configuring Custom Security Certificates Within GlassFish/Payara
706(3)
Problem
706(1)
Solution
706(1)
How It Works
707(2)
Chapter 18 Concurrency and Batch Applications 709(24)
18.1 Creating Resources for Processing Tasks Asynchronously in an Application Server
710(3)
Problem
710(1)
Solution #1
710(1)
Solution #2
711(1)
How It Works
712(1)
18.2 Configuring and Creating a Reporter Task
713(4)
Problem
713(1)
Solution
713(3)
How It Works
716(1)
18.3 Running More Than One Task Concurrently
717(3)
Problem
717(1)
Solution
717(2)
How It Works
719(1)
18.4 Utilizing Transactions Within a Task
720(2)
Problem
720(1)
Solution
720(1)
How It Works
721(1)
18.5 Running Concurrent Tasks at Scheduled Times
722(3)
Problem
722(1)
Solution
722(2)
How It Works
724(1)
18.6 Creating Thread Instances
725(2)
Problem
725(1)
Solution
725(1)
How It Works
726(1)
18.7 Creating an Item-Oriented Batch Process
727(6)
Problem
727(1)
Solution
727(3)
How It Works
730(3)
Appendix A: Java EE Development with Apache NetBeans IDE 733(14)
A.1 Configuring Application Servers Within NetBeans
733(2)
Developing Java Web or Enterprise Applications
735(1)
A.2 Creating a NetBeans Java Web Project
735(3)
A.3 Creating JSF Application Files
738(3)
A.4 Developing Entity Classes
741(1)
A.5 Using JPQL
742(1)
A.6 Using HTML5
742(5)
Index 747
Josh Juneau has been developing software and database systems for several years. Database application development and sophisticated web apps have been the focus of his career since the beginning. Early in his career, he became an Oracle database administrator and adopted the PL/SQL language for performing administrative tasks and developing applications for Oracle database. In an effort to build more complex solutions, he began to incorporate Java into his PL/SQL applications and later developed stand-alone and web applications with Java. Josh wrote his early Java web applications utilizing JDBC to work with back-end databases. Later, he incorporated frameworks into his enterprise solutions, including Java EE, Spring, and JBoss Seam. Today, he primarily develops enterprise web solutions utilizing Java EE.





Josh extended his knowledge of the JVM by developing applications with other JVM languages such as Jython and Groovy. In 2006, Josh became the editor and publisher for the Jython Monthly newsletter. In late 2008, he began a podcast dedicated to the Jython programming language. Josh was the lead author for The Definitive Guide to Jython, Oracle PL/SQL Recipes, and Java 7 Recipes, which were published by Apress. Since then, he has continued to author Java-related books for Apress, including his most recent work entitled Java 9 Recipes. He is an avid contributor to Oracles Java Magazine, and he speaks at Java User Groups and conferences when has the opportunity. 









Josh works as an application developer and systems analyst, and he is a contributor to the Chicago Java User Group. He is an Apache NetBeans committer, and a Java Champion. He participates in the JCP and had been a part of the JSF expert group for the development of Java EE 8. Josh has a wonderful wife and five children with whom he loves to spend time. To hear more from Josh, follow his blog, jj-blogger, which can be found at blogspot. You can also follow him on Twitter via @javajuneau.