Murach's Java Servlets and JSP (2nd Edition)
How to use JDBC to work with a database

This chapter shows how to code a Java servlet that works with a MySQL database. Along the way, it shows how to use the JDBC API and how to implement connection pooling.

Chapter 14 How to use JDBC to work with a database
How to work with JDBC 442
An introduction to database drivers 442
How to connect to a database 444
How to return a result set and move the cursor through it 446
How to retrieve data from a result set 448
How to insert, update, and delete data 450
How to work with prepared statements 452
The SQL Gateway application 454
The user interface 454
The code for the JSP 456
The code for the servlet 458
The code for the utility class 462
How to work with connection pooling 464
How connection pooling works 464
How to make a connection pool available 464
How to implement a connection pool 466
How to use a connection pool 468
The Email List application 470
The user interface 470
The code for the JSP 470
The code for the servlet 472
The code for the database class 474
The code for the utility class 480
t




Murach's Java Servlets and JSP

Learn more about this book

View the table of contents

Add this book to your cart