| Sun Java System Application Server |
The JDBC-Simple application demonstrates a servlet and JavaServer Pages (JSP) accessing a stateless session bean. It also demonstrates using JDBC to insert and retrieve rows from a database. The JDBC-Simple application extends the HelloWorld sample application by storing the generated greetings in a database, enabling you to retrieve all greetings that have been issued.
Before you deploy or run the application, you must ensure that a database resource has been configured for
Application Server. The included asant deployment script automatically performs this step for you.
But if you are using another deployment mechanism, you must perform it manually.
You can use any JDBC-compliant relational database server, but specific instructions are provided for the following:
The general instructions for building, deploying, and running sample applications are provided in Building, Deploying, and Running Sample Applications. In reading this document, use the following application-specific variables for this application:
install_dir is the directory where Application Server
is installed.
app_dir is the application base directory: install_dir/samples/jdbc/apps/simple.
jdbc-simple.ear.
Follow this general procedure:
build.xml, is in the app_dir
directory, specifically, install_dir/samples/jdbc/apps/simple.
install_dir/samples/jdbc/apps/simple/jdbc-simple.ear.
Do not run asant unsetup or asadmin delete-jdbc-connection-pool ... if you
are running the jdbc-transactions sample.
After building and deploying the application, follow these steps to run and use it:
http://hostname:port/jdbc-simple/
Copyright © 2006 Sun Microsystems, Inc. All rights reserved.