table of contents
CSAJSP/2

Source Code Archive

Core Servlets and JavaServer Pages

Second Edition

Volume 1: Core Technologies


Chapter 18: Configuring MS Access, MySQL, and Oracle9i

Complete source code for every example from this chapter, available free for unrestricted use. Live links to all URLs cited in the chapter. More information. To view source code for other chapters in this book, mouse over the table of contents bar on the left.

Source Code from Chapter

Note: right-click or shift-click on the links to download the associated file.

  • initCSAJSP.ora. Initialization parameter file for Oracle9i database on Windows XP.
  • create_csajsp.sql. SQL command to create an Oracle9i database named csajsp.
  • TestDatabase.java. Test program to perform the following tests on a database:
    1. Create a JDBC connection to the database and report the product name and version.
    2. Create a simple authors table containing the ID, first name, and last name of the authors of Core Servlets and JavaServer Pages, 2nd Edition.
    3. Query the authors table for all rows.
    4. Determine the reported JDBC version.
  • CreateMusicTable.java. Program to create a simple table named music in the database specified on the command line. The driver for the database is loaded using the DriverUtilities class.
  • DriverUtilities.java. Some simple utilities for building JDBC connections to databases from different vendors. For details on usage and supporting classes required, see Chapter 17.
  • create_music_table.sql. SQL script to create music table.
    • From MySQL monitor run:
      mysql> SOURCE create_music_table.sql
    • From Oracle9i SQL*Plus run:
      SQL> START create_music_table.sql
    In both cases, you may need to specify the full path to the SQL script.

URLs Referenced in Chapter

More Information

Java

JSF (JavaServer Faces)

Servlets & JSP
Ajax, GWT, & JavaScript

Spring, Hibernate, & JPA

Struts