4. The entry in the bootstrap.properties file should now look like Figure 42.
##################################################################
# Java Virtual Machine configuration
#
##################################################################
##
# The classpath for the JVM. This classpath is appended to the front
# of the WebSphere Runtime classpath. This classpath should contain
# the JVM Classes and any user classes. The WebSphere classpath is
# built dynamically from the contents of the \lib
# directory
Java.classpath=/opt/jdk118/lib/classes.zip:/opt/IBMWebAS/classes:/opt/I
BMWebAS/web/classes:/usr/IBMdb2/V6.1/Java/db2Java.zip
Figure 42. Adding db2Java.zip to the WebSphere Java.classpath parameter
Modifying IBM HTTP server configuration files
In order for the JDBC connection to work, the DB2INSTANCE environment
parameter must be set, and the library paths must be modified to include the
DB2 library. We modify the IBM HTTP Server startup file,
/etc/rd.d/initd/ibmhttpd, and added the environment variables shown in Figure
43.
...
# |||||||||||||||||| START CONFIGURATION SECTION ||||||||||||||||||
#                   
                   
#
# The path to DB2 stuff
export DB2INSTANCE=db2inst1
export LIBPATH=/usr/IBMdb2/V6.1/lib:$LIBPATH
export LD_LIBRARY_PATH=$LIBPATH:$LD_LIBRARY_PATH
...
Figure 43. DB2INSTANCE and LIBPATH in the ibmhttpd file
Restart IBM HTTP Server to activate these settings.
Verifying access to the backend DB2 database
We can now verify the access to our DB2 SAMPLE database with the
TestDB2 servlet code found in Appendix B.1,  Java servlet TestDB2  on page
147. Register the servlet in WebSphere, then access the servlet. The output
from the servlet is shown in Figure 44 on page 49.
48
Linux Web Hosting with WebSphere, DB2, and Domino




  

Home

About Services Network Support FAQ Order Contact
 

Linux Web Hosting

Our partners:Jsp Web Hosting Unlimited Web Hosting Cheapest Web Hosting  Java Web Hosting Web Templates Best Web Templates PHP Mysql Web Hosting Interland Web Hosting Cheap Web Hosting PHP Web Hosting Tomcat Web Hosting Quality Web Hosting Best Web Hosting  Mac Web Hosting 

Lunarwebhost.net  Business web hosting division of Vision Web Hosting Inc. All rights reserved