informix
Informix JDBC Driver Programmer's Guide
Programming with Informix JDBC Driver

Using an HTTP Proxy Server

You might need to use an HTTP proxy server because of these features:

The solution to both these problems is to install Informix JDBC Driver on the same computer as the Java applet and install the HTTP proxy as a middle tier between the Java applet and Informix database machines.

The HTTP proxy feature is not part of the JDBC 2.0 specification. The HTTP proxy is a lightweight servlet that extracts SQL requests from the JDBC client and transmits them to a database server. The client (the end user) is unaware of this extra layer.

To specify a proxy, amend the database URL statement:

The Web server must support servlets. (For example, the Sun and Apache Java Web servers do.)

To add a proxy servlet to a Sun Java Web server

  1. Copy two class files, IfxJDBCProxy.class and SessionMgr.class, to the servlet directory. These two class files reside in directory proxy, which is under the installation directory for Informix JDBC Driver after the product bundle is installed.
  2. Go to the URL http://server-host-name:port-number using a Web browser. The Java Web server administrator page appears.
  3. Enter admin as the user, followed by the administrator password, to log on to the Web server administrator management menu.
  4. Choose Web Service Servlets Add.
  5. Type a JDBC servlet name and class. Name the servlet for the JDBC proxy IfxJDBCProxy.

This procedure makes the Web server aware of the proxy servlet.

The steps for adding a proxy server to other Java Web servers are similar. Consult the documentation specific to your Web server for instructions on how to configure the servlet.

Depending on your Web server, the proxy servlet may be loaded when the Web server is started or the first time it is referenced in the URL of your applet or application connection object.

The following Web sites offer more information about proxy servlets:

Other ways to use Informix JDBC Driver in a multiple-tier environment are as follows:


Informix JDBC Driver Programmer's Guide, Version 2.0
Copyright © 1999, Informix Software, Inc. All rights reserved