Skip Headers
Oracle® Database Express Edition 2 Day Plus Java Developer Guide
10
g
Release 2 (10.2)
Part Number B25320-02
Home
Book List
Index
Master Index
Contact Us
Next
View PDF
Contents
List of Examples
List of Figures
List of Tables
Title and Copyright Information
Preface
Audience
Documentation Accessibility
Related Documents
Conventions
1
Using Java with Oracle Database XE
Using Java to Connect to Oracle Database XE
Oracle JDBC Thin Driver
Oracle JDBC OCI Driver
Oracle JDBC Packages
Using JDeveloper to Create JDBC Applications
JDeveloper Tools
JDeveloper User Interface
Overview of Sample Java Application
Resources
2
Getting Started with Oracle Database XE
What You Need to Install
Oracle Database XE Server
Modifying the HR Schema for the JDBC Application
Oracle Database XE Client
J2SE or JDK
Integrated Development Environment
Web Server
Verifying the Oracle Database XE Client Installation
Checking Installed Directories and Files
Checking the Environment Variables
Determining the JDBC Driver Version
Installing Oracle JDeveloper
JDeveloper Studio Edition: Base Installation and Full Installation
Steps to Install JDeveloper
Starting JDeveloper
3
Connecting to Oracle Database XE
Connecting to Oracle Database from JDeveloper
JDeveloper Connection Navigator
Creating a Database Connection
Browsing the Data Using the Connection Navigator
Setting Up Applications and Projects in JDeveloper
Using the JDeveloper Application Navigator
Creating an Application and a Project
Viewing the Javadoc and Source Code Available in the Project Scope
Connecting to the Database from a Java Application
Overview of Connecting to Oracle Database
Specifying Database URLs
Connecting from the Oracle Database XE Client
Creating a Java Class in JDeveloper
Java Libraries
Oracle JDBC Library
JSP Runtime Library
Adding JDBC and JSP Libraries
Importing the JDBC Packages
Declaring Connection-Related Variables
Creating the Connection Method
4
Querying and Displaying Data
Querying Data: Important JDBC Concepts
About SQL Statements
Query Methods for the Statement Object
About Result Sets
Scrollability, Positioning, and Sensitivity
Types of Result Sets
Updatability
Concurrency Types for Updatability
Summary of Result Set Types
Querying Data from a Java Application
Creating a Method in JDeveloper to Query Data
Testing the Connection and the Query Methods
Creating JSP Pages
Overview of Page Presentation
JSP Tags
Scriptlets
HTML Tags
HTML Forms
Creating a Simple JSP Page
Adding Static Content to a JSP Page
Adding a Style Sheet to a JSP Page
Displaying Query Results on a JSP Page
Adding a JSP useBean Tag to Initialize the DataHandler Class
Creating a Result Set
Adding a Table to the JSP Page to Display the Result Set
Filtering a Query Result Set
Creating a Method for Filtering Results
Testing the Query Filter Method
Adding Filter Controls to the JSP Page
Displaying Filtered Data in the JSP Page
Adding Login Functionality to the Application
Creating a Method to Authenticate Users
Creating a Login Page
Preparing Error Reports for Failed Logins
Creating the Login Interface
Creating a JSP Page to Handle Login Action
Testing the JSP Page
5
Updating Data
Creating a JavaBean
Creating a JavaBean in JDeveloper
Defining the JavaBean Properties and Methods
Updating Data from a Java Class
Creating a Method to Identify an Employee Record
Creating a Method to Update Employee Data
Adding a Link to Navigate to an Update Page
Creating a JSP Page to Edit Employee Data
Creating a JSP Page to Handle an Update Action
Inserting a Record from a Java Class
Creating a Method to Insert Data
Adding a Link to Navigate to an Insert Page
Creating a JSP Page to Enter New Data
Creating a JSP Page to Handle an Insert Action
Deleting a Record from a Java Class
Creating a Method for Deleting Data
Adding a Link to Delete an Employee
Creating a JSP Page to Handle a Delete Action
Exception Handling
Adding Exception Handling to Java Methods
Creating a Method for Handling Any SQLException
Navigation in the Sample Application
Creating a Starting Page for an Application
6
Using Additional Functionality in Oracle Database XE
Using Dynamic SQL
Using OraclePreparedStatement
Using OracleCallableStatement
Using Bind Variables
Calling Stored Procedures
Creating a SQL Stored Procedure in JDeveloper
Creating a Method to Use the Stored Procedure
Allowing Users to Choose the Stored Procedure
Calling the Stored Procedure from the Application
Using Cursor Variables
Oracle REF CURSOR Type Category
Accessing REF CURSOR Data
Using REF CURSOR in the Sample Application
Creating a Package in the Database
Creating a Database Function
Calling the REF CURSOR from a Method
Displaying a Dynamically Generated List
7
Getting Unconnected
Creating a Method to Close All Open Objects
Closing Open Objects in the Application
8
Building Global Applications
Developing Locale Awareness
Mapping Between Oracle and Java Locales
Determining User Locales
Locale Awareness in Java Applications
Encoding HTML Pages
Specifying the Page Encoding for HTML Pages
Specifying the Page Encoding in Java Servlets and JSP Pages
Organizing the Content of HTML Pages for Translation
Strings in Java Servlets and JSP Pages
Static Files
Data from the Database
Presenting Data by User Locale Convention
Oracle Date Formats
Oracle Number Formats
Oracle Linguistic Sorts
Oracle Error Messages
Localizing Text on JSP Pages in JDeveloper
Creating a Resource Bundle
Using Resource Bundle Text on JSP Pages
Index