Home Page Icon
Home Page
Table of Contents for
Title Page
Close
Title Page
by Josh Juneau
Java EE 7 Recipes: A Problem-Solution Approach
Title Page
Dedication
Contents at a Glance
Contents
About the Author
About the Technical Reviewers
Acknowledgments
Introduction
CHAPTER 1: Introduction to Servlets
1-1. Setting Up a Java Enterprise Environment
1-2. Developing a Servlet
1-3. Packaging, Compiling, and Deploying a Servlet
1-4. Registering Servlets Without WEB-XML
1-5. Displaying Dynamic Content with a Servlet
1-6. Handling Requests and Responses
1-7. Listening for Servlet Container Events
1-8. Setting Initialization Parameters
1-9. Filtering Web Requests
1-10. Listening for Attribute Changes
1-11. Applying a Listener to a Session
1-12. Managing Session Attributes
1-13. Downloading a File
1-14. Dispatching Requests
1-15. Redirecting to a Different Site
1-16. Securely Maintaining State Within the Browser
1-17. Finalizing Servlet Tasks
1-18. Reading and Writing with Nonblocking I/O
CHAPTER 2: JavaServer Pages
2-1. Creating a Simple JSP Page
2-2. Embedding Java into a JSP Page
2-3. Separating Business Logic from View Code
2-4. Yielding or Setting Values
2-5. Invoking a Function in a Conditional Expression
2-6. Creating a JSP Document
2-7. Embedding Expressions in EL
2-8. Accessing Parameters in Multiple Pages
2-9. Creating a Custom JSP Tag
2-10. Including Other JSPs into a Page
2-11. Creating an Input Form for a Database Record
2-12. Looping Through Database Records Within a Page
2-13. Handling JSP Errors
2-14. Disabling Scriptlets in Pages
2-15. Ignoring EL in Pages
CHAPTER 3: The Basics of JavaServer Faces
3-1. Writing a Simple JSF Application
3-2. Writing a Managed Bean
3-3. Building Sophisticated JSF Views with Components
3-4. Displaying Messages in JSF Pages
3-5. Navigation Based Upon Conditions
3-6. Updating Messages Without Recompiling
3-7. Validating User Input
3-8. Evaluation of Page Expressions Immediately
3-9. Passing Page Parameters to Methods
3-10. Arithmetic and Reserved Words in Expressions
3-11. Creating Bookmarkable URLs
3-12. Displaying Lists of Objects
3-13. Invoking Managed Bean Actions on Life-Cycle Phase Events
CHAPTER 4: Facelets
4-1. Creating a Page Template
4-2. Applying a Template to Your Views
4-3. Ensuring Resource Availability from All Views
4-4. Creating Reusable Templates That Act As Components
4-5. Handling Variable-Length Data on a Page
4-6. Debugging View Content
4-7. Writing a Custom Resolver for Locating Facelets Templates and Resources
CHAPTER 5: JavaServer Faces Standard Components
Component and Tag Primer
5-1. Creating an Input Form
5-2. Invoking Actions from Within a Page
5-3. Displaying Output
5-4. Adding Form Validation
5-5. Adding Select Lists to Pages
5-6. Adding Graphics to Your Pages
5-7. Adding Check Boxes to a View
5-8. Adding Radio Buttons to a View
5-9. Structuring View Layout
5-10. Displaying a Collection of Data
5-11. Utilizing Custom JSF Component Libraries
5-12. Implementing File Uploading
CHAPTER 6: Advanced JavaServer Faces and Ajax
6-1. Validating Input with Ajax
6-2. Submitting Pages Without Page Reloads
6-3. Making Partial-Page Updates
6-4. Applying Ajax Functionality to a Group of Components
6-5. Custom Processing of Ajax Functionality
6-6. Custom Conversion of Input Values
6-7. Maintaining Managed Bean Scopes for a Session
6-8. Listening for System-Level Events
6-9. Listening for Component Events
6-10. Invoking a Managed Bean Action on Render
6-11. Asynchronously Updating Components
6-12. Developing JSF Components Containing HTML5
6-13. Listening to JSF Phases
6-14. Adding Autocompletion to Text Fields
6-15. Developing Custom Constraint Annotations
6-16. Customizing Data Tables
6-17. Developing a Page Flow
6-18. Constructing a JSF View in Pure HTML5
CHAPTER 7: JDBC
7-1. Obtaining Database Drivers and Adding Them to the CLASSPATH
7-2. Connecting to a Database
7-3. Handling Database Connection Exceptions
7-4. Simplifying Connection Management
7-5. Querying a Database
7-6. Performing CRUD Operations
7-7. Preventing SQL Injection
7-8. Utilizing Java Objects for Database Access
7-9. Displaying Database Results in JSF Views
7-10. Navigating Data with Scrollable ResultSets
7-11. Calling PL/SQL Stored Procedures
7-12. Querying and Storing Large Objects
7-13. Caching Data for Use When Disconnected
7-14. Joining RowSet Objects When Not Connected to the Data Source
CHAPTER 8: Object-Relational Mapping
8-1. Creating an Entity
8-2. Mapping Data Types
8-3. Creating a Persistence Unit
8-4. Using Database Sequences to Create Primary Key Values
8-5. Generating Primary Keys with More Than One Attribute
8-6. Defining a One-to-One Relationship
8-7. Defining One-to-Many and Many-to-One Relationships
8-8. Defining a Many-to-Many Relationship
8-9. Querying with Named Queries
8-10. Performing Validation on Entity Fields
8-11. Generating Database Schema Objects Automatically
CHAPTER 9: Enterprise JavaBeans
9-1. Obtaining an Entity Manager
9-2. Developing a Stateless Session Bean
9-3. Developing a Stateful Session Bean
9-4. Utilizing Session Beans with JSF
9-5. Persisting an Object
9-6. Updating an Object
9-7. Returning a Table Model
9-8. Creating a Singleton Bean
9-9. Scheduling a Timer Service
9-10. Performing Optional Transaction Life-Cycle Callbacks
9-11. Ensuring a Stateful Session Bean Is Not Passivated
9-12. Denoting Local and Remote Interfaces
9-13. Processing Messages Asynchronously from Enterprise Beans
CHAPTER 10: The Query API and JPQL
10-1. Querying All Instances of an Entity
10-2. Setting Parameters to Filter Query Results
10-3. Returning a Single Object
10-4. Creating Native Queries
10-5. Querying More Than One Entity
10-6. Calling JPQL Aggregate Functions
10-7. Invoking Database Stored Procedures Natively
10-8. Joining to Retrieve Instances Matching All Cases
10-9. Joining to Retrieve All Rows Regardless of Match
10-10. Applying JPQL Functional Expressions
10-11. Forcing Query Execution Rather Than Cache Use
10-12. Performing Bulk Updates and Deletes
10-13. Retrieving Entity Subclasses
10-14. Joining with ON Conditions
CHAPTER 11: Oracle's GlassFish
11-1. Installing the GlassFish Application Server
11-2. Logging into the Administrative Console
11-3. Changing the Administrator User Password
11-4. Deploying a WAR File
11-5. Adding a Database Resource
11-6. Adding Forms-Based Authentication
11-7. Configuring and Using JavaMail
CHAPTER 12: Contexts and Dependency Injection
12-1. Injecting a Bean or Other Object
12-2. Binding a Bean to JSF Views
12-3. Allocating a Specific Bean for Injection
12-4. Determining Scope of a Bean
12-5. Injecting Non-bean Objects
12-6. Ignoring Classes
12-7. Disposing of Producer Fields
12-8. Specifying an Alternative Implementation at Deployment Time
12-9. Injecting Bean Metadata
CHAPTER 13: Java Message Service
13-1. Creating JMS Resources
13-2. Creating a Session
13-3. Creating and Sending a Message
13-4. Receiving Messages
13-5. Filtering Messages
13-6. Inspecting Message Queues
13-7. Creating Durable Message Subscribers
13-8. Delaying Message Delivery
CHAPTER 14: Authentication and Security
14-1. Setting Up Application Users and Groups in GlassFish
14-2. Performing Basic Web Application Authentication
14-3. Developing a Programmatic Login Form
14-4. Managing Page Access Within a JSF Application
14-5. Configuring LDAP Authentication Within GlassFish
14-6. Configuring Custom Security Certificates Within GlassFish
CHAPTER 15: Java Web Services
15-1. Creating a JAX-WS Web Service Endpoint
15-2. Deploying a JAX-WS Web Service
15-3. Consuming a JAX-WS Web Service via WSDL
15-4. Consuming a JAX-WS Web Service via a Stand-Alone Application Client
15-5. Integrating Web Services into a Java EE Project
15-6. Developing a RESTful Web Service
15-7. Consuming and Producing with REST
15-8. Writing a JAX-RS Client
15-9. Filtering Requests and Responses
15-10. Processing Long-Running Operations Asynchronously
CHAPTER 16: Enterprise Solutions Using Alternative Programming Languages
16-1. Developing Servlets with Groovy
16-2. Working with Groovy Servlet Parameters
16-3. Developing Servlets with Jython
CHAPTER 17: WebSockets and JSON-P
17-1. Creating a WebSocket Endpoint
17-2. Sending Messages to a WebSocket Endpoint
17-3. Building a JSON Object
17-4. Writing a JSON Object to Disk
17-5. Reading JSON from an Input Source
CHAPTER 18: JavaFX in the Enterprise
18-1. Developing a Basic JavaFX Application
18-2. Incorporating Databases into a JavaFX Application
18-3. Constructing a Sophisticated UI Containing EJB Data
18-4. Developing an Enterprise Application Using MVC
18-5. Incorporating REST Services into JavaFX Applications
CHAPTER 19: Concurrency and Batch Applications
19-1. Creating Resources for Processing Tasks Asynchronously in an Application Server
19-2. Configuring and Creating a Reporter Task
19-3. Running More Than One Task Concurrently
19-4. Utilizing Transactions Within a Task
19-5. Running Concurrent Tasks at Scheduled Times
19-6. Creating Thread Instances
19-7. Creating an Item-Oriented Batch Process
APPENDIX A: Java EE Development with NetBeans IDE
A-1. Configuring Application Servers Within NetBeans
A-2. Creating a NetBeans Java Web Project
A-3. Creating JSF Application Files
A-4. Developing EJB Entity Classes
A-5. JPQL
A-6. HTML5
Index
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Cover
Next
Next Chapter
Copyright
Java EE 7 Recipes
A Problem-Solution Approach
Josh Juneau
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset