About this task
The HTTP proxy requires a web server that supports servlets,
preferably a web server whose servlet engine uses a 2.1 or greater
servlet API. The proxy is compatible with 2.0 and earlier servlet
APIs, but the PROXYTIMEOUT feature is only enabled with a 2.1 or greater
API.
To configure your environment for a proxy server:
Procedure
- Define a servlet alias or context for the proxy servlet
in your web server configuration.
The JDBC driver directs
all client HTTP requests to:
http://your-web-server:port/pathname/IfxJDBCProxy
where
IfxJDBCProxy is
the proxy servlet and
pathname is the path to the
proxy servlet. Consult your web server documentation for the correct
way to configure servlets.
- Copy three class files-IfxJDBCProxy.class, SessionMgr.class,
and TimeoutMgr.class-to the servlet directory
you specified in the previous step.
These class files
reside in the directory proxy, which is under
the installation directory for Informix® JDBC
Driver after
the product bundle is installed.
- Add the Informix JDBC
Driver file, ifxjdbc.jar,
to the CLASSPATH setting on your web server.
Some web
servers use the CLASSPATH of the environment under which the server
is started, while others get their CLASSPATH from a web server-specific
properties file. Consult your web server documentation for the correct
place to update the CLASSPATH setting.
- Start your web server and verify that the proxy is installed
correctly by entering the following URL:
http://server-host-name:port-number/servlet/
IfxJDBCProxy
The proxy replies with the following
banner:
-- Informix Proxy Servlet v220 Servlet API 2.1 --
v220
represents
the
Informix proxy
version.
Servlet API 2.1
represents the version of
your web servers servlet API.
If the servlet API is 2.0 or earlier,
the banner says Servlet API 0.0
.
- After configuring the proxy, append the following to your
applet or applications URL:
PROXY=server-host-name:port-number
For example:
jdbc:informix-sqli://123.45.67.89:1533:INFORMIXSERVER=
myserver;user=rdtest;password=test;
PROXY=webserver:1462;
Results
Depending on your web server, the proxy servlet might 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 websites offer more information about proxy servlets:
- www.oracle.com
- java.apache.org