Preface |
|
xix | |
Acknowledgments |
|
xxi | |
About the Author |
|
xxiii | |
Copyrights and Trademarks |
|
xxv | |
|
|
1 | (8) |
|
1.1 Outstanding Features of This Book |
|
|
2 | (1) |
|
1.2 Whom This Book Is For |
|
|
2 | (1) |
|
1.3 What This Book Covers |
|
|
2 | (2) |
|
1.4 How This Book Is Organized and How to Use This Book |
|
|
4 | (1) |
|
1.5 How to Use the Source Code and the Sample Database |
|
|
5 | (4) |
|
1.5.1 Instructor Materials and Customer Support |
|
|
5 | (4) |
|
Chapter 2 Introduction to Databases |
|
|
9 | (58) |
|
2.1 What Are Databases and Database Programs? |
|
|
9 | (2) |
|
2.1.1 File Processing System |
|
|
10 | (1) |
|
2.1.2 Integrated Databases |
|
|
10 | (1) |
|
2.2 Developing a Database |
|
|
11 | (1) |
|
|
12 | (4) |
|
2.3.1 Relational Data Model |
|
|
15 | (1) |
|
2.3.2 Entity-Relationship (ER) Model |
|
|
16 | (1) |
|
|
16 | (2) |
|
2.4.1 Primary Key and Entity Integrity |
|
|
16 | (1) |
|
|
17 | (1) |
|
2.4.3 Foreign Keys and Referential Integrity |
|
|
17 | (1) |
|
|
18 | (3) |
|
|
18 | (3) |
|
|
21 | (1) |
|
|
21 | (4) |
|
2.7.1 First Normal Form (INF) |
|
|
22 | (1) |
|
2.7.2 Second Normal Form (2NF) |
|
|
22 | (1) |
|
2.7.3 Third Normal Form (3NF) |
|
|
23 | (2) |
|
2.8 Database Components in Some Popular Databases |
|
|
25 | (6) |
|
2.8.1 Microsoft Access Databases |
|
|
25 | (1) |
|
|
25 | (1) |
|
|
26 | (1) |
|
|
26 | (1) |
|
2.8.2 SQL Server Databases |
|
|
26 | (1) |
|
|
27 | (1) |
|
|
27 | (1) |
|
|
27 | (1) |
|
2.8.2.4 Stored Procedures |
|
|
27 | (1) |
|
2.8.2.5 Keys and Relationships |
|
|
27 | (1) |
|
|
28 | (1) |
|
2.8.2.7 Transaction Log Files |
|
|
28 | (1) |
|
|
28 | (1) |
|
|
29 | (1) |
|
|
29 | (1) |
|
|
29 | (1) |
|
2.8.3.4 Stored Procedures |
|
|
29 | (1) |
|
2.8.3.5 Initialization Parameter Files |
|
|
30 | (1) |
|
|
30 | (1) |
|
|
31 | (1) |
|
|
31 | (1) |
|
2.9 Create a New Oracle XE 18c Sample Database |
|
|
31 | (32) |
|
2.9.1 Connect to Default Oracle Database from the Oracle SQL Developer |
|
|
31 | (1) |
|
2.9.2 Create an Oracle User Account for the User Schema |
|
|
32 | (4) |
|
|
36 | (1) |
|
2.9.4 Create Faculty Table |
|
|
37 | (3) |
|
2.9.5 Create Other Tables |
|
|
40 | (3) |
|
2.9.6 Create Relationships among Tables |
|
|
43 | (1) |
|
2.9.6.1 Create Relationship between Login and Faculty Tables |
|
|
43 | (2) |
|
2.9.6.2 Create Relationship between Login and Student Tables |
|
|
45 | (3) |
|
2.9.6.3 Create Relationship between Faculty and Course Tables |
|
|
48 | (1) |
|
2.9.6.4 Create Relationship between Student and StudentCourse Tables |
|
|
48 | (1) |
|
2.9.6.5 Create Relationship between Course and StudentCourse Tables |
|
|
49 | (3) |
|
2.9.7 Store Images in the Oracle 18c Express Edition Database |
|
|
52 | (1) |
|
2.9.7.1 Store Images in the FACULTY Table |
|
|
53 | (7) |
|
2.9.7.2 Store Images in the STUDENT Table |
|
|
60 | (3) |
|
2.10 A Shortcut: How to Use the Sample Database without Building It |
|
|
63 | (1) |
|
|
63 | (4) |
|
|
64 | (3) |
|
Chapter 3 JDBC API and JDBC Drivers |
|
|
67 | (20) |
|
3.1 What Are JDBC and JDBC API? |
|
|
67 | (1) |
|
3.2 JDBC Components and Architecture |
|
|
67 | (2) |
|
|
69 | (3) |
|
3.3.1 Establish a Connection |
|
|
69 | (1) |
|
3.3.1.1 Using DriverManager to Establish a Connection |
|
|
69 | (1) |
|
3.3.1.2 Using DataSource Object to Establish a Connection |
|
|
70 | (1) |
|
3.3.2 Build and Execute Oracle Statements |
|
|
71 | (1) |
|
|
71 | (1) |
|
3.3.3.1 Using a ResultSet Object |
|
|
71 | (1) |
|
3.3.3.2 Using a RowSet Object |
|
|
72 | (1) |
|
3.4 JDBC Driver and Driver Types |
|
|
72 | (3) |
|
3.4.1 Type I: JDBC-ODBC Bridge Driver |
|
|
72 | (1) |
|
3.4.2 Type II: Native-API-Partly-Java Driver |
|
|
73 | (1) |
|
3.4.3 Type III: JDBC-Net-All-Java Driver |
|
|
74 | (1) |
|
3.4.4 Type IV: Native-Protocol-All-Java Driver |
|
|
75 | (1) |
|
3.5 JDBC Standard Extension API |
|
|
75 | (8) |
|
|
75 | (1) |
|
3.5.1.1 Java Naming and Directory Interface |
|
|
76 | (1) |
|
3.5.1.2 Deploy and Use a Basic Implementation of DataSource |
|
|
76 | (1) |
|
3.5.2 JDBC Driver-Based Connection Pooling |
|
|
77 | (2) |
|
3.5.3 Distributed Transactions |
|
|
79 | (1) |
|
3.5.3.1 Distributed Transaction Components and Scenarios |
|
|
80 | (1) |
|
3.5.3.2 The Distributed Transaction Process |
|
|
80 | (1) |
|
|
81 | (1) |
|
3.5.4.1 Introduction to Java RowSet Object |
|
|
82 | (1) |
|
3.5.4.2 Implementation Process of a RowSet Object |
|
|
82 | (1) |
|
|
83 | (4) |
|
|
84 | (3) |
|
Chapter 4 JDBC Applications and Design Considerations |
|
|
87 | (36) |
|
4.1 J DBC Application Models |
|
|
87 | (2) |
|
4.1.1 Two-Tier Client-Server Model |
|
|
87 | (1) |
|
4.1.2 Three-Tier Client-Server Model |
|
|
88 | (1) |
|
4.2 JDBC Application Fundamentals |
|
|
89 | (30) |
|
4.2.1 Loading and Registering Drivers |
|
|
89 | (2) |
|
|
91 | (1) |
|
4.2.2.1 The DriverManager and Driver Classes |
|
|
91 | (1) |
|
4.2.2.2 Using the DriverManager.getConnection() Method |
|
|
91 | (1) |
|
4.2.2.3 Using the Driver.connect() Method |
|
|
92 | (1) |
|
4.2.2.4 The JDBC Connection URL |
|
|
93 | (1) |
|
4.2.2.5 Establish a Database Connection |
|
|
93 | (2) |
|
4.2.3 Executing Statements |
|
|
95 | (1) |
|
4.2.3.1 Overview of Statement Objects and Their Execution Methods |
|
|
95 | (4) |
|
4.2.3.2 Using the Statement Object |
|
|
99 | (1) |
|
4.2.3.2.1 Creating the Statement Object |
|
|
99 | (1) |
|
4.2.3.2.2 Executing the Statement Object |
|
|
99 | (1) |
|
4.2.3.3 Using the PreparedStatement Object |
|
|
99 | (1) |
|
4.2.3.3.1 Creating the PreparedStatement Object |
|
|
100 | (1) |
|
4.2.3.3.2 Setting the Input Parameters |
|
|
100 | (1) |
|
4.2.3.3.3 Set Primitive Data Type and Object IN Values |
|
|
101 | (1) |
|
4.2.3.3.4 Executing the PreparedStatement Object |
|
|
102 | (1) |
|
4.2.3.4 Using the CallableStatement Object |
|
|
103 | (1) |
|
4.2.3.4.1 Building a CallableStatement Query String |
|
|
103 | (1) |
|
4.2.3.4.2 Creating the CallableStatement Object |
|
|
104 | (1) |
|
4.2.3.4.3 Setting the Input Parameters |
|
|
105 | (1) |
|
4.2.3.4.4 Registering the Output Parameters |
|
|
105 | (1) |
|
4.2.3.4.5 Executing the CallableStatement Object |
|
|
106 | (1) |
|
4.2.3.5 More about the Execution Methods |
|
|
106 | (2) |
|
4.2.3.6 Creating and Executing Oracle Statements |
|
|
108 | (1) |
|
4.2.3.6.1 Creating and Executing DDL Statements |
|
|
108 | (1) |
|
4.2.3.6.2 Creating and Executing DML Statements |
|
|
109 | (1) |
|
4.2.3.6.3 JDBC Escape Syntax |
|
|
109 | (1) |
|
|
110 | (2) |
|
4.2.4.1 The ResultSet Interface |
|
|
112 | (1) |
|
4.2.4.2 Getting and Processing the ResultSet Object |
|
|
113 | (1) |
|
4.2.4.2.1 Fetching by Row |
|
|
113 | (1) |
|
4.2.4.2.2 Fetching by Column |
|
|
114 | (1) |
|
4.2.5 Using JDBC MetaData Interfaces |
|
|
115 | (1) |
|
4.2.5.1 Using the ResultSetMetaData Interface |
|
|
115 | (2) |
|
4.2.5.2 Using the DatabaseMetaData Interface |
|
|
117 | (1) |
|
4.2.5.3 Using the ParameterMetaData Interface |
|
|
118 | (1) |
|
4.2.6 Closing the Connection and Statements |
|
|
119 | (1) |
|
|
119 | (4) |
|
|
120 | (3) |
|
Chapter 5 Introduction to Apache NetBeans IDE |
|
|
123 | (32) |
|
5.1 Overview of Apache NetBeans 12 |
|
|
123 | (5) |
|
5.1.1 The Apache NetBeans Platform |
|
|
125 | (1) |
|
5.1.2 The Apache NetBeans Open-Source IDE |
|
|
126 | (2) |
|
5.2 Installing and Confirming the Apache NetBeans IDE |
|
|
128 | (1) |
|
5.3 Exploring the Apache NetBeans IDE 12 |
|
|
129 | (20) |
|
5.3.1 An Overview of the Apache NetBeans IDE 12 GUI |
|
|
129 | (2) |
|
5.3.2 Build a New Java with Ant Project |
|
|
131 | (1) |
|
5.3.2.1 Build a Java Application Project |
|
|
132 | (2) |
|
5.3.2.1.1 Add a Graphical User Interface |
|
|
134 | (2) |
|
5.3.2.1.2 Add Other GUI-Related Components |
|
|
136 | (1) |
|
5.3.2.1.3 Develop the Code for Three Buttons |
|
|
137 | (1) |
|
5.3.2.1.3.1 Code for the Display Button |
|
|
138 | (1) |
|
5.3.2.1.3.2 Code for the Clear Button |
|
|
138 | (1) |
|
5.3.2.1.3.3 Code for the Exit Button |
|
|
139 | (1) |
|
5.3.2.1.4 Run the Project |
|
|
140 | (1) |
|
5.3.2.2 Build a Java Class Library |
|
|
140 | (1) |
|
5.3.2.2.1 Create a Java Class Library Project |
|
|
141 | (1) |
|
5.3.2.2.2 Create a Java Application Project |
|
|
142 | (1) |
|
5.3.2.2.3 ConFigure the Compilation Classpath |
|
|
143 | (1) |
|
5.3.2.2.4 Add Code to the Main.java Tab in the Java Application Project |
|
|
144 | (1) |
|
5.3.2.2.5 Run the Application Project to Call the Java Library |
|
|
145 | (1) |
|
5.3.2.2.6 Build and Deploy the Application |
|
|
146 | (1) |
|
5.3.2.2.7 Distribute the Application to Other Users |
|
|
147 | (1) |
|
5.3.2.3 Build a Java Project with Existing Sources |
|
|
148 | (1) |
|
5.3.2.4 Build a Free-Form Java Project |
|
|
148 | (1) |
|
5.3.3 Build a Java Web Application Project |
|
|
149 | (1) |
|
5.4 Set up the Environment for the Apache NetBeans IDE 12 to Build Our Customer Projects |
|
|
149 | (1) |
|
|
149 | (6) |
|
|
150 | (5) |
|
PART I Building Two-Tier Client-Server Applications |
|
|
|
Chapter 6 Querying Data from Databases |
|
|
155 | (68) |
|
6.1 Introduction to Runtime Object Method |
|
|
155 | (1) |
|
6.2 Connect to the Oracle Database 18c Express Edition CSE_DEPT |
|
|
155 | (3) |
|
6.3 Create a Java Application Project to Access the Oracle Database |
|
|
158 | (61) |
|
6.3.1 Create Graphic User Interfaces |
|
|
159 | (4) |
|
6.3.2 Create a Message Box with JDialog Form Class |
|
|
163 | (3) |
|
6.3.3 Add Oracle JDBC Driver to the Project |
|
|
166 | (1) |
|
6.3.3.1 Load and Register the Oracle JDBC Driver |
|
|
167 | (1) |
|
6.3.3.2 JDBC Uniform Resource Locators (URLs) |
|
|
168 | (1) |
|
6.3.3.3 Create and Manage the Statement and PreparedStatement Objects |
|
|
169 | (1) |
|
6.3.3.4 Use ResultSet Object |
|
|
170 | (1) |
|
6.3.3.4.1 Fetching by Row |
|
|
171 | (1) |
|
6.3.3.4.2 Fetching by Column |
|
|
171 | (1) |
|
6.3.4 Develop Code for the Login Table to Connect to Our Sample Database |
|
|
172 | (1) |
|
6.3.5 Use the PreparedStatement Object to Perform Dynamic Query for the Login Table |
|
|
173 | (2) |
|
6.3.6 Develop the Code for the SelectionFrame Form |
|
|
175 | (3) |
|
6.3.7 Perform a Data Query for the Faculty Table |
|
|
178 | (1) |
|
6.3.7.1 Add Java Package and Code for the Constructor |
|
|
179 | (1) |
|
6.3.7.2 Introduction to Some Popular JDBC MetaData Interfaces |
|
|
180 | (1) |
|
6.3.7.2.1 The DatabaseMetaData Interface |
|
|
180 | (1) |
|
6.3.7.2.2 The ResultSetMetaData Interface |
|
|
181 | (1) |
|
6.3.7.2.3 The ParameterMetaData Interface |
|
|
181 | (1) |
|
6.3.7.3 Use Java executeQuery() with the DatabaseMetaData Interface to Query the Faculty Table |
|
|
181 | (2) |
|
6.3.7.4 Use the Java execute() Method to Query the Faculty Table |
|
|
183 | (1) |
|
6.3.7.5 Use the Java CallableStatement Method to Query the Faculty Table |
|
|
184 | (1) |
|
6.3.7.5.1 Build and Formulate the CallableStatement Query String |
|
|
185 | (1) |
|
6.3.7.5.2 Create a CallableStatement Object |
|
|
186 | (1) |
|
6.3.7.5.3 Set the Input Parameters |
|
|
186 | (2) |
|
6.3.7.5.4 Register the Output Parameters |
|
|
188 | (1) |
|
6.3.7.5.5 Execute CallableStatement |
|
|
189 | (1) |
|
6.3.7.5.6 Retrieve the Run Results |
|
|
189 | (1) |
|
6.3.7.5.7 The Syntax of Creating Stored Procedures in the Oracle Database |
|
|
190 | (1) |
|
6.3.7.5.8 The Syntax of Creating Packages in the Oracle Database |
|
|
190 | (2) |
|
6.3.7.5.9 Create an Oracle Package Facultylnfo |
|
|
192 | (2) |
|
6.3.7.5.10 Develop the Code to Perform the CallableStatement Query |
|
|
194 | (3) |
|
6.3.7.6 Display an Image for the Selected Faculty Member in Canvas |
|
|
197 | (1) |
|
6.3.7.6.1 Operational Sequence to Display an Image in Java |
|
|
197 | (1) |
|
6.3.7.6.2 Create a User-Defined Method to Select and Display Desired Faculty Image |
|
|
198 | (2) |
|
6.3.7.6.3 Develop Additional Code to Coordinate the Image Display |
|
|
200 | (1) |
|
6.3.7.7 Develop the Code for the Back Button Click Event Handler |
|
|
201 | (1) |
|
6.3.7.8 Build and Run the Project to Test Functions of the FacultyFrame Form |
|
|
201 | (1) |
|
6.3.8 Perform the Data Query for the Course Table |
|
|
202 | (1) |
|
6.3.8.1 Import Java Packages and Code for the CourseFrame Constructor |
|
|
203 | (1) |
|
6.3.8.2 Create an Oracle Package, FacultyCourse |
|
|
203 | (3) |
|
6.3.8.3 Develop the Code to Perform the CallableStatement Query |
|
|
206 | (5) |
|
6.3.9 Query Data from the Student Table Using the Java RowSet Object |
|
|
211 | (1) |
|
6.3.9.1 Introduction to Java RowSet Object |
|
|
211 | (1) |
|
6.3.9.2 The Operational Procedure of Using the JDBC RowSet Object |
|
|
212 | (1) |
|
6.3.9.3 Coding for the Constructor of the StudentFrame Class |
|
|
213 | (1) |
|
6.3.9.4 Coding for the Select Button Event Handler to Query Data Using the CachedRowSet |
|
|
214 | (3) |
|
6.3.9.5 Display a Student Picture for the Selected Student |
|
|
217 | (2) |
|
|
219 | (4) |
|
|
219 | (4) |
|
Chapter 7 Insert, Update and Delete Data from Databases |
|
|
223 | (52) |
|
7.1 Perform Data Manipulations to Oracle Database Using the Java Runtime Object |
|
|
223 | (1) |
|
7.2 Perform Data Insertion to Oracle Database Using the Java Runtime Object Method |
|
|
223 | (8) |
|
7.2.1 Develop the Code for the Insert Button Event Handler |
|
|
225 | (1) |
|
7.2.2 Develop a Method for Data Checking Prior to Data Insertion |
|
|
226 | (1) |
|
7.2.3 Develop a Method for Selecting a Valid Faculty Image |
|
|
226 | (2) |
|
7.2.4 Find a Way to Enable the Insert Button to Begin a New Data Insertion |
|
|
228 | (1) |
|
7.2.5 Develop a Method for Clearing Original Faculty Information |
|
|
228 | (1) |
|
7.2.6 Develop the Code for the Validation of the Data Insertion |
|
|
229 | (1) |
|
7.2.7 Build and Run the Project to Test the Data Insertion |
|
|
229 | (2) |
|
7.3 Perform Data Update to Oracle Database Using the Java Runtime Object Method |
|
|
231 | (4) |
|
7.3.1 Modify the Code Inside the FacultyFrame Constructor |
|
|
231 | (2) |
|
7.3.2 Develop the Code for the Update Button Event Handler |
|
|
233 | (1) |
|
7.3.3 Build and Run the Project to Test the Data Update |
|
|
234 | (1) |
|
7.4 Perform Data Delete to Oracle Database Using the Java Runtime Object |
|
|
235 | (4) |
|
7.4.1 Develop the Code for the Delete Button Event Handler |
|
|
236 | (1) |
|
7.4.2 Build and Run the Project to Test the Data Deletion |
|
|
237 | (2) |
|
7.5 Perform Data Manipulation Using UpdaTable ResultSet |
|
|
239 | (13) |
|
7.5.1 Introduction to ResultSet Enhanced Functionalities and Categories |
|
|
239 | (2) |
|
7.5.2 Perform Data Manipulation Using the UpdaTable ResultSet Object |
|
|
241 | (1) |
|
7.5.2.1 Insert a New Row Using the UpdaTable ResultSet |
|
|
241 | (5) |
|
7.5.2.2 Update a Data Row Using the UpdaTable ResultSet |
|
|
246 | (4) |
|
7.5.2.3 Delete a Data Row Using the UpdaTable ResultSet |
|
|
250 | (2) |
|
7.6 Perform Data Manipulation Using Callable Statements |
|
|
252 | (16) |
|
7.6.1 Insert Data to the Course Table Using Callable Statements |
|
|
252 | (1) |
|
7.6.1.1 Develop the Oracle Stored Procedure InsertNewCourse() |
|
|
252 | (3) |
|
7.6.1.2 Develop the Code for the Insert Button Click Event Handler |
|
|
255 | (3) |
|
7.6.2 Update Data to the Course Table Using Callable Statements |
|
|
258 | (1) |
|
7.6.2.1 Develop the Oracle Stored Procedure UpdateCourse() |
|
|
259 | (3) |
|
7.6.2.2 Develop the Code for the Update Button Click Event Handler |
|
|
262 | (2) |
|
7.6.3 Delete Data from the Course Table Using Callable Statements |
|
|
264 | (1) |
|
7.6.3.1 Develop the Stored Procedure DeleteCourse() |
|
|
265 | (1) |
|
7.6.3.2 Develop the Code for the Delete Button Click Event Handler |
|
|
266 | (2) |
|
|
268 | (7) |
|
|
268 | (7) |
|
PART II Building Three-Tier Client-Server Applications |
|
|
|
Chapter 8 Develop Java Web Applications to Access Databases |
|
|
275 | (120) |
|
8.1 A Historical Review about Java Web Application Development |
|
|
275 | (34) |
|
8.1.1 Using Servlet and HTML Web Pages for Java Web Applications |
|
|
275 | (3) |
|
8.1.2 Using JavaServer Pages Technology for Java Web Applications |
|
|
278 | (3) |
|
8.1.3 Using Java Help Class Files for Java Web Applications |
|
|
281 | (5) |
|
8.1.4 Using the JSP Implicit Object Session for Java Web Applications |
|
|
286 | (1) |
|
8.1.4.1 Modify the FacultyPage JSP File to Use the Session Object |
|
|
287 | (1) |
|
8.1.4.2 Build the Transaction JSP File, FacultyQuery.jsp |
|
|
288 | (1) |
|
8.1.4.3 Build the Help Class FacultyBean |
|
|
289 | (3) |
|
8.1.5 Using Java Beans Technology for Java Web Applications |
|
|
292 | (2) |
|
8.1.5.1 Modify the Help Class FacultyBean to Make It a Java Bean Class |
|
|
294 | (2) |
|
8.1.5.2 Build a New Starting Web Page, FacultyBeanPage |
|
|
296 | (1) |
|
8.1.6 Using JavaServer Faces Technology for Java Web Applications |
|
|
297 | (2) |
|
8.1.6.1 The Application Configuration Resource File, faces-config.xml |
|
|
299 | (1) |
|
8.1.6.2 Sample JavaServer Face Page Files |
|
|
300 | (2) |
|
8.1.6.3 The Java Bean Class File |
|
|
302 | (1) |
|
8.1.6.4 The Web Deployment Descriptor File, web.xml |
|
|
302 | (1) |
|
8.1.6.5 A Complete Run Procedure of JSF Web Applications |
|
|
303 | (1) |
|
8.1.6.5.1 The Java Bean-JSF Page Relationship and Page Navigation |
|
|
304 | (4) |
|
8.1.6.5.2 The Detailed Code for the Java Bean Class |
|
|
308 | (1) |
|
8.2 Java EE Web Application Model |
|
|
309 | (2) |
|
8.2.1 Java EE Web Applications with and without EJB |
|
|
309 | (2) |
|
8.3 The Architecture and Components of Java Web Applications |
|
|
311 | (8) |
|
|
312 | (1) |
|
|
312 | (1) |
|
8.3.2.1 Enterprise Java Beans API Technology |
|
|
313 | (1) |
|
8.3.2.2 Java Servlet API Technology |
|
|
313 | (1) |
|
8.3.2.3 JavaServer Pages API Technology |
|
|
313 | (2) |
|
8.3.2.4 JavaServer Faces API Technology |
|
|
315 | (1) |
|
8.3.2.5 Java Transaction API |
|
|
316 | (1) |
|
8.3.2.6 Java Message Service API |
|
|
316 | (1) |
|
8.3.3 Java Web Application Life Cycle |
|
|
316 | (1) |
|
|
317 | (1) |
|
8.3.5 Java Web Frameworks |
|
|
318 | (1) |
|
8.4 Build Java Web Project to Query Oracle Database |
|
|
319 | (37) |
|
8.4.1 Create Five Web Pages Using Microsoft Office Publisher 2007 |
|
|
320 | (1) |
|
8.4.1.1 Create the Login Page |
|
|
320 | (1) |
|
8.4.1.2 Create the Selection Page |
|
|
321 | (2) |
|
8.4.1.3 Create the Faculty Page |
|
|
323 | (3) |
|
8.4.1.4 Create the Course Page |
|
|
326 | (3) |
|
8.4.1.5 Create the Student Page |
|
|
329 | (1) |
|
8.4.2 Setup Environments for NetBeans IDE to Build Java Web Applications |
|
|
330 | (1) |
|
8.4.2.1 Download and Install Required Components |
|
|
330 | (1) |
|
8.4.2.2 ConFigure Apache NetBeans IDE 12 and Create Our First Web Application Project |
|
|
331 | (2) |
|
8.4.2.2.1 Setup the Correct JDBC Driver and Java Platform |
|
|
333 | (1) |
|
8.4.3 Access and Query the Login Table Using JavaServer Pages and Help Class Files |
|
|
334 | (1) |
|
8.4.3.1 Modify the Logln.jsp Page and Create LogInQuery.jsp File |
|
|
334 | (3) |
|
8.4.3.2 Create the Java Help Class File LoglnQuery.java |
|
|
337 | (1) |
|
8.4.3.3 Create a Dialog Box as the Message Box |
|
|
337 | (1) |
|
8.4.3.4 Develop the Code for the Java Model or Java Help Class File |
|
|
338 | (1) |
|
8.4.3.4.1 Import Oracle-Related Package and Create the Class Constructor |
|
|
339 | (1) |
|
8.4.3.4.2 Build the Code for the checkLogIn() Method |
|
|
340 | (1) |
|
8.4.3.4.3 Build the Code for the CloseDBConnection() Method |
|
|
341 | (3) |
|
8.4.4 Develop the Code for the Selection Page |
|
|
344 | (2) |
|
8.4.5 Query the Faculty Table Using JavaServer Pages and JSP Implicit Session Object |
|
|
346 | (1) |
|
8.4.5.1 Query Faculty Records with Image via Web Server and Display Them in JSP Pages |
|
|
346 | (2) |
|
8.4.5.2 Modify the Faculty.jsp Page |
|
|
348 | (1) |
|
8.4.5.3 Create the FacultyProcess.jsp Page |
|
|
349 | (3) |
|
8.4.5.4 Create the Help Class or Java Model File, FacultyQuery.java |
|
|
352 | (4) |
|
8.5 Build a Java Web Project to Manipulate Data in the Oracle Database |
|
|
356 | (22) |
|
8.5.1 Modify the Faculty.jsp Page by Adding a File Selection Function |
|
|
357 | (1) |
|
8.5.2 Insert New Records to the Faculty Table Using JavaServer Pages and Java Beans |
|
|
358 | (1) |
|
8.5.2.1 Create a New Java Help Class File, FacultylnsertBean. Java |
|
|
359 | (1) |
|
8.5.2.2 Modify the FacultyProcess.jsp Page to Handle Faculty Data Collection and Insertion |
|
|
360 | (6) |
|
8.5.3 Update and Delete Data from the Faculty Table Using JSP and Java Beans Techniques |
|
|
366 | (1) |
|
8.5.3.1 Create a New Java Session Bean Class |
|
|
367 | (2) |
|
8.5.3.2 Modify the FacultyProcess Page to Handle Faculty Data Updating |
|
|
369 | (4) |
|
8.5.3.3 Add a Method to the Java Bean to Perform Faculty Data Deleting |
|
|
373 | (1) |
|
8.5.3.4 Modify the FacultyProcess Page to Handle Faculty Data Deleting |
|
|
374 | (4) |
|
8.6 Query the Course Table Using JavaServer Pages and JSP Implicit Session Object |
|
|
378 | (10) |
|
8.6.1 Modify the Course.jsp Page |
|
|
379 | (1) |
|
8.6.2 Create the CourseProcess.jsp Page |
|
|
380 | (4) |
|
8.6.3 Create the Java Bean or Java Model File, CourseQuery.java |
|
|
384 | (4) |
|
|
388 | (7) |
|
|
390 | (5) |
|
Chapter 9 Develop Java Web Services to Access Databases |
|
|
395 | (130) |
|
9.1 Introduction to Java Web Services |
|
|
395 | (3) |
|
9.1.1 REST-Based Web Services |
|
|
396 | (1) |
|
9.1.2 SOAP-Based Web Services |
|
|
397 | (1) |
|
9.2 The Structure and Components of SOAP-Based Web Services |
|
|
398 | (1) |
|
9.3 The Procedure of Building a Typical SOAP-Based Web Service Project |
|
|
399 | (11) |
|
9.3.1 Create a New Java Web Application Project, WSTestApp |
|
|
400 | (1) |
|
9.3.2 Create a New Java SOAP-Based Web Service Project, WSTest |
|
|
401 | (3) |
|
9.3.3 Add Desired Operations to the Web Service |
|
|
404 | (1) |
|
9.3.4 Deploy and Test the Web Service on the Selected Container |
|
|
404 | (4) |
|
9.3.5 Create Web Service Clients to Consume the Web Service |
|
|
408 | (2) |
|
9.4 Getting Started with Java Web Services Using NetBeans IDE |
|
|
410 | (1) |
|
9.5 Build Java Web Service Projects to Access and Manipulate the Faculty Table |
|
|
411 | (10) |
|
9.5.1 Create a New Java Web Application Project, WebAppFaculty |
|
|
412 | (1) |
|
9.5.2 Create a New Java SOAP-Based Web Service Project, WebServiceFaculty |
|
|
413 | (1) |
|
9.5.3 Add the First Web Operation to Our Web Services to Perform a Data Query |
|
|
413 | (3) |
|
9.5.4 Build the User-Defined Method DBConnection() |
|
|
416 | (1) |
|
9.5.5 Add the Second Operation to Our Web Service to Query the Faculty Image |
|
|
416 | (3) |
|
9.5.6 Setup the Correct JDBC Driver and Java Platform for Our Web Service |
|
|
419 | (1) |
|
9.5.7 Deploy the Web Service Project and Test the Data Query Function |
|
|
419 | (2) |
|
9.6 Build a Window-Based Client Project to Consume the Web Service |
|
|
421 | (7) |
|
9.6.1 Copy the FacultyFrame and MsgDislog Components as GUIs |
|
|
421 | (1) |
|
9.6.2 Create a Web Service Reference for Our Window-Based Client Project |
|
|
422 | (1) |
|
9.6.3 Develop the Code to Call Our Web Service Project |
|
|
423 | (4) |
|
9.6.4 Build and Run Our Client Project to Query Faculty Data via Web Service |
|
|
427 | (1) |
|
9.7 Build a Web-Based Client Project to Consume the Web Service |
|
|
428 | (5) |
|
9.7.1 Create a Web-Based Client Project, WebClientFaculty_Select |
|
|
428 | (1) |
|
9.7.2 Create a Java Managed Bean Class, FacultyMBean |
|
|
429 | (1) |
|
9.7.3 Modify Three Files to Make Them Work for Our Web Client Project |
|
|
429 | (2) |
|
9.7.4 Add a Web Service Reference to Our Web-Based Client Project |
|
|
431 | (2) |
|
9.7.5 Build and Run Our Client Project to Query Faculty Data via Web Service |
|
|
433 | (1) |
|
9.8 Build Java Web Services to Insert Data into the Oracle Database |
|
|
433 | (4) |
|
9.8.1 Add a New Operation InsertFaculty() into Our Web Service Project |
|
|
434 | (2) |
|
9.8.2 Deploy the Web Service Project |
|
|
436 | (1) |
|
9.9 Build a Window-Based Client Project to Consume the Web Service |
|
|
437 | (5) |
|
9.9.1 Refresh the Web Service Reference for Our Window-Based Client Project |
|
|
438 | (1) |
|
9.9.2 Develop the Code to Call Our Web Service Project |
|
|
438 | (2) |
|
9.9.3 Build and Run Our Client Project to Insert Faculty Data via Web Service |
|
|
440 | (2) |
|
9.10 Build a Web-Based Client Project to Consume the Web Service |
|
|
442 | (6) |
|
9.10.1 Refresh the Web Service Reference for Our Web-Based Client Project |
|
|
442 | (1) |
|
9.10.2 Develop the Code to Call Our Web Service Project |
|
|
443 | (3) |
|
9.10.3 Build and Run Our Client Project to Insert Faculty Data via Web Service |
|
|
446 | (2) |
|
9.11 Build Java Web Service to Update and Delete Data from the Oracle Database |
|
|
448 | (7) |
|
9.11.1 Add a New Operation, UpdateFaculty(), to Perform Faculty Data Update |
|
|
449 | (2) |
|
9.11.2 Add a New Operation, DeleteFaculty(), to Perform Faculty Data Delete |
|
|
451 | (2) |
|
9.11.3 Deploy and Test the Web Service Project |
|
|
453 | (2) |
|
9.12 Build a Window-Based Client Project to Consume the Web Service |
|
|
455 | (7) |
|
9.12.1 Refresh the Web Service Reference for Our Window-Based Client Project |
|
|
456 | (1) |
|
9.12.2 Build the Code to Call the UpdateFacultyO Operation |
|
|
456 | (2) |
|
9.12.3 Build the Code to Call the DeleteFacultyO Operation |
|
|
458 | (1) |
|
9.12.4 Build and Run Our Client Project to Update and Delete Faculty Record via Web Service |
|
|
459 | (3) |
|
9.13 Build a Web-Based Client Project to Consume the Web Service |
|
|
462 | (8) |
|
9.13.1 Refresh the Web Service Reference for Our Web-Based Client Project |
|
|
462 | (1) |
|
9.13.2 Develop the Code to Call Our Web Service Operation, UpdateFaculty() |
|
|
463 | (1) |
|
9.13.3 Develop the Code to Call Our Web Service Operation DeleteFaculty() |
|
|
464 | (1) |
|
9.13.4 Add Necessary Code to the FacultyProcess.jsp Page to Do Data Updating and Deleting |
|
|
465 | (2) |
|
9.13.5 Build and Run Our Client Project to Update and Delete Faculty Record via Web Service |
|
|
467 | (3) |
|
9.14 Build Java Web Service Project to Access Course Table in Our Sample Database |
|
|
470 | (15) |
|
9.14.1 Create a New Java Web Application Project, WebAppCourse |
|
|
470 | (1) |
|
9.14.2 Create a New Java SOAP-Based Web Service Project, WebServiceCourse |
|
|
470 | (1) |
|
9.14.3 The Organization of Web Service Operations |
|
|
471 | (1) |
|
9.14.4 Create and Build Web Service Operations |
|
|
471 | (1) |
|
9.14.4.1 Create and Build the Web Operation QueryCourseID() |
|
|
472 | (3) |
|
9.14.4.2 Build and Run the Web Service to Test the CourselD Query Function |
|
|
475 | (1) |
|
9.14.4.3 Create and Build the Web Operation QueryCourse() |
|
|
476 | (2) |
|
9.14.4.4 Create and Build the Web Operation InsertCourse() |
|
|
478 | (3) |
|
9.14.4.5 Create and Build the Web Operation UpdateCourse() |
|
|
481 | (2) |
|
9.14.4.6 Create and Build the Web Operation DeleteCourse() |
|
|
483 | (2) |
|
9.15 Build Windows-Based Project to Consume the Web Service Project |
|
|
485 | (14) |
|
9.15.1 Update the Web Service Reference for Our Window-Based Client Project |
|
|
486 | (1) |
|
9.15.2 Develop the Code to Query Course Information from our Web Service |
|
|
487 | (1) |
|
9.15.3 Build Code for the Select Button Event Handler to Query CourselDs |
|
|
487 | (1) |
|
9.15.4 Build Code for the CourseListValueChanged() Method to Get Course Details |
|
|
488 | (3) |
|
9.15.5 Build Code for the Insert Button Event Handler to Insert a New Course |
|
|
491 | (4) |
|
9.15.6 Build Code for the Update Button Method to Update Course Records |
|
|
495 | (3) |
|
9.15.7 Build Code for the Delete Button Method to Delete Course Records |
|
|
498 | (1) |
|
9.16 Build a Web-Based Client Project to Consume our Web Service Project |
|
|
499 | (19) |
|
9.16.1 Create a Web-Based Client Project, WebClientCourse_Select |
|
|
500 | (1) |
|
9.16.2 Add a Web Service Reference to Our Web-Based Project and Change the Ports |
|
|
501 | (1) |
|
9.16.3 Modify the Java Bean CourseQuery.java and the Control File CourseProcess.jsp |
|
|
502 | (3) |
|
9.16.4 Build and Run Our Client Project to Query Course Record via Our Web Service |
|
|
505 | (1) |
|
9.16.5 Build a Web Client Project to Insert New Course Records via Our Web Service |
|
|
506 | (4) |
|
9.16.6 Build Our Client Project to Update Course Records via Our Web Service |
|
|
510 | (6) |
|
9.16.7 Build Our Client Project to Delete Course Records via Our Web Service |
|
|
516 | (2) |
|
|
518 | (7) |
|
|
520 | (5) |
Appendix A Download and Install Oracle Database XE 18c |
|
525 | (6) |
Appendix B Download and Install Apache NetBeans 12.0 |
|
531 | (4) |
Appendix C Download and Install Oracle SQL Developer |
|
535 | (2) |
Appendix D Download and Install DevExpress WinForms |
|
537 | (2) |
Appendix E How to Use the Sample Database |
|
539 | (4) |
Appendix F How to Export the Sample Database |
|
543 | (4) |
Appendix G Download and Install dotConnect Express |
|
547 | (6) |
Appendix H Download JDBC Driver for Oracle XE 18c |
|
553 | (2) |
Appendix I Download and Install Tomcat Server 8.0.27 |
|
555 | (2) |
Appendix J Download and Install Java JDK 8 |
|
557 | (4) |
Appendix K Trouble Shooting for the WS00041 Service Exception |
|
561 | (2) |
Appendix L Download and Install Apache NetBeans 12.4 |
|
563 | (4) |
Appendix M ConFigure Apache NetBeans 12.0 for Initial Runs |
|
567 | (2) |
Appendix N Download and Install Java JDK 14 |
|
569 | (4) |
Index |
|
573 | |