All Packages  This Package

Class examples.jdbc.pool.simpleselect

javax.servlet.GenericServlet
   |
   +----javax.servlet.http.HttpServlet
           |
           +----examples.jdbc.pool.simpleselect

public class simpleselect
extends HttpServlet
This example shows how to use a WebLogic pool driver to make a JDBC connection for a servlet.

To set up this example:

  1. Set up your development shell as described in Setting up your environment.

  2. Compile this example by executing the following command in your development shell:

    $ javac -d %SERVLET_CLASSES% simpleselect.java

  3. Register the servlet in your weblogic.properties file by adding the following property:
      weblogic.httpd.register.pooltest=examples.jdbc.pool.simpleselect

  4. Register the connection pool "oraclePool" in your WebLogic Server's weblogic.properties file by uncommenting the lines that refer to the connectionPool.oraclePool. Make sure to uncomment the ACLs for this connection pool as well. If you are not using an Oracle database, adjust the connection properties in these lines so that they are appropriate for your database.

  5. Start your WebLogic Server.

  6. Call the servlet from a browser with a URL like

    http://WebLogicHost:port/pooltest

    Where WebLogicHost:port is the hostname and port number of your WebLogic Server.

Author:
Copyright (c) 1997-2000 by BEA Systems, Inc. All Rights Reserved.

Constructor Index

 o simpleselect()

Method Index

 o service(HttpServletRequest, HttpServletResponse)
This implements the service method in HttpServlet.

Constructors

 o simpleselect
 public simpleselect()

Methods

 o service
 public synchronized void service(HttpServletRequest req,
                                  HttpServletResponse res) throws IOException
This implements the service method in HttpServlet. The method uses a dbKona DataSet along with the pool driver for database access, and htmlKona to generate an HTML page for display.

Overrides:
service in class HttpServlet

All Examples This Package