/opt/oracle/product/9.2.0.2/Apache/Jserv/etc/jserv.properties
dosyasına şunu ekliyoruz
wrapper.classpath=/opt/oracle/product/9.2.0.2/jdbc/lib/db2java.zip
wrapper.classpath=/opt/oracle/product/9.2.0.2/jdbc/lib/db2jcc.jar
sonra apachectl graceful diyerek yeniden başlatıyoruz web sunucusunu.
Daha sonra aşağıdaki uyarıya göre db2jstrt komutuyla dinleyici çalıştırıyoruz.
DB2 için kullanacağımız bağlantı katarı şu şekilde test edilebilir
The DB2 UDB JDBC Applet Server is started with the command:db2jstrt <port number>
Every time the db2jstrt command is executed, a db2jd process is created.
<%@page import="java.sql.*"%>
<% // Define the connection Connection con = null; // Check that the DB2Driver class is available System.getProperty("java.library.path"); Class.forName("COM.ibm.db2.jdbc.net.DB2Driver"); try { // DB2 veritabanına bağlanma denemesi DriverManager.registerDriver (new COM.ibm.db2.jdbc.net.DB2Driver()); out.println("Test başlıyor... "); con = DriverManager.getConnection("jdbc:db2://localhost:6789/user","user","passwd"); out.println("Test başarıyla tamamlandı. DB2'ya bağlanıldı. "); } // Hata oluşursa bilelim catch (SQLException e) { out.println(e.getMessage()); } %>