0% found this document useful (0 votes)
54 views

CONTEXWeb 3000 Installation Procedure

Uploaded by

Right from
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views

CONTEXWeb 3000 Installation Procedure

Uploaded by

Right from
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 43

Compunetix

CONTEXWeb Installation
Procedure
Version 3.00.0

Document Number: 31-CWEB-INSTALL-3000-00

Confidential and Proprietary


January 6, 2006
PROPRIETARY INFORMATION
©Compunetix, Inc. 2006 All Rights Reserved

This document and the data included in this document


is proprietary to Compunetix, Inc. and is not to be
reproduced, used, or disclosed in whole or in part to
anyone without the express written permission of
Compunetix, Inc. The content of this document is
provided for informational use only and is subject to
change without notice.

Questions about this document or the features it


describes should be directed to:

Compunetix, Inc.
Communications Systems Division
2420 Mosside Boulevard
Monroeville, PA 15146
CONTEXWeb Installation Procedure
Version 3.00.0
Page i

Table of Contents
1 Introduction.........................................................................................................1
2 Before Upgrade.....................................................................................................1
3 Apache 2.0 - Tomcat 5.5 Installation Procedure..............................................................1
4 IIS 5.0/6.0 - Tomcat 5.5 Installation Procedure ............................................................ 17
5 Configuration Procedure for Sample Skin .................................................................... 32
6 Configuration Procedures for Database Connectivity. ..................................................... 34
6.1 CONTEXWeb Connection Pooling ....................................................................... 34
6.1.1 ODBC resource ................................................................................. 34

w
6.1.2 JDBC database ................................................................................. 34
6.2 Tomcat Database Connection Pool Resource ......................................................... 35

w
6.2.1 ODBC resource ................................................................................. 35
6.2.2 JDBC database ................................................................................. 37

w
.
Table of Figures

c
o
Figure 1 JDK Installation ............................................................................ 1

m
Figure 2 JDK Installation Optional Features ..................................................... 2
Figure 3 Setting the JAVA_HOME System Variable .............................................. 2

p
Figure 4 Apache Tomcat Installation.............................................................. 3

u
Figure 5 Selecting Components to Install......................................................... 4
Figure 6 Tomcat Installation Location ............................................................ 5

n
Figure 7 Tomcat Basic Configuration.............................................................. 6
Figure 8 JVM Location ............................................................................... 7

e
Figure 9 Tomcat Monitor Application ............................................................ 8

t
Figure 10 Apache Web Server Installation........................................................ 9

i
Figure 11 Apache Web Server Information ..................................................... 10
Figure 12 Apache Web Server Setup Type...................................................... 11

x
Figure 13 Apache Web Server Destination Folder ............................................. 12

.
Figure 14 Apache Service Monitor ............................................................... 13
Figure 15 Local Host Apache Tomcat Web Site................................................ 13

c
Figure 16 Localhost Apache WebSite............................................................ 14

o
Figure 17 Apache - Tomcat Integration Servlet Examples ................................... 16
Figure 18 Apache - Tomcat Integration JSP examples ....................................... 16

m
Figure 19 JDK Installation......................................................................... 17
Figure 20 JDK Custom Setup...................................................................... 18
Figure 21 Setting the JAVA_HOME ............................................................... 18
Figure 22 Tomcat Installation Procedure....................................................... 19
Figure 23 Tomcat Setup Components ........................................................... 20
Figure 24 Tomcat Default Installation location ............................................... 21
Figure 25 Tomcat Configuration ................................................................. 22
Figure 26 Tomcat JVM location .................................................................. 23
Figure 27 Tomcat Services Monitor.............................................................. 24
Figure 28 Stopping IIS Service .................................................................... 24
Figure 29 IIS Manager .............................................................................. 25
Figure 30 Default Web Site ....................................................................... 26
Figure 31 Jakarta ISAPI Filter .................................................................... 27
Figure 32 Web Service Isolation Mode .......................................................... 28
Figure 33 Allowing Web Service Extension Jakarta ........................................... 29

Compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page ii

Figure 34 IIS - Tomcat Integration Servlet Examples ......................................... 30


Figure 35 IIS - Tomcat Integration JSP Examples.............................................. 30
w
w
w
.
c
o
m
p
u
n
e
t
i
x
.
c
o
m

compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 1

1 Introduction
This document describes the procedure for installation of CONTEXWeb 3.00.0 for both Apache Web Server
and Microsoft IIS Web Server. Both web servers require the use of Tomcat 5.5 as a servlet engine. These
procedures assume a working knowledge of Windows based operations.

2 Before Upgrade
If an upgrade is being performed, please shutdown all web servers, and backup the CONTEXWeb

w
directories.

w
3 Apache 2.0 - Tomcat 5.5 Installation Procedure

w
.
This procedure will install Apache 2.0 with Tomcat 5.5.

c
1. Run the Java development Kit setup executable supplied with the installation (jdk-1_5_0_05-windows-

o
i586-p.exe). This version of CONTEXWeb and Tomcat requires that version 1.5 and higher (Java 5.0) of

m
the JDK is installed.

p
u
n
e
t
i
x
.
c
o
m

Figure 1 JDK Installation


2. Note the location of the install

Compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 2
w
w
w
.
c
o
m
p
u

Figure 2 JDK Installation Optional Features


n

3. The installer will automatically install the JRE environment.


e

4. Set the JAVA_HOME setting in the environment settings. To complete this change, open the control
t

panel, and then double click on the System settings. Choose the Advanced tab, and click on the
i

Environment variables button. Add a new System variable called JAVA_HOME and set it to the newly
x

installed JDK. Make sure that the variable value points to the jdk and not the jre. When done click OK
.

and close the environmental variables and System properties windows.


c
o
m

Figure 3 Setting the JAVA_HOME System Variable

5. Run the Tomcat installation procedure by executing the apache-tomcat-5.5.12.exe application. This
version of CONTEXWeb requires Tomcat version 5.0 and higher.

compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 3

w
w
w
.
c
o
m
p
u
Figure 4 Apache Tomcat Installation

n
e
6. When prompted to install specific components, choose to perform a full installation. This step installs

t
the Tomcat service, native dlls, examples and webapps.

i
x
.
c
o
m

Compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 4
w
w
w
.
c
o
m
p
u

Figure 5 Selecting Components to Install


n

7. Installing to the default folder is acceptable.


e
t
i
x
.
c
o
m

compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 5

w
w
w
.
c
o
m
p
u
Figure 6 Tomcat Installation Location

n
8. The tomcat installation should serve on port 8080, define the Administrator login.

e
t
i
x
.
c
o
m

Compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 6
w
w
w
.
c
o
m
p
u

Figure 7 Tomcat Basic Configuration


n

9. The installer should find the location of the JRE that was just installed. Click install to install the
e

servlet engine.
t
i
x
.
c
o
m

compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 7

w
w
w
.
c
o
m
p
u
Figure 8 JVM Location

n
10. When complete, the installation program will ask you if you want to start the Tomcat Service. Choose

e
yes. An icon will show up in the taskbar. Double-clicking this icon will bring up the Tomcat Properties

t
window. This application allows you to start and stop the Tomcat Service.

i
x
.
c
o
m

Compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 8
w
w
w
.
c
o
m
p
u
n

Figure 9 Tomcat Monitor Application


e

11. Run the Apache installation procedure. Do this by executing the apache_2.0.55-win32-x86-no_ssl.msi
t

installer application.
i
x
.
c
o
m

compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 9

w
w
w
.
c
o
m
p
u
Figure 10 Apache Web Server Installation

n
12. Carefully define the Server information. This is critical for a proper installation. Choose to install

e
Apache as a service so that it starts when the server is started.

t
i
x
.
c
o
m

Compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 10
w
w
w
.
c
o
m
p
u

Figure 11 Apache Web Server Information


n

13. Choose a typical installation unless you need to change the components of the install.
e
t
i
x
.
c
o
m

compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 11

w
w
w
.
c
o
m
p
u
Figure 12 Apache Web Server Setup Type

n
e
14. Verify that the install location is correct.

t
i
x
.
c
o
m

Compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 12
w
w
w
.
c
o
m
p
u

Figure 13 Apache Web Server Destination Folder


n

15. Proceed with the Apache 2 installation. The installation procedure will install Apache as a service and
e

provide another icon in the task manager to control the start and stop of the Apache service. The
t

apache web server will start upon completion of the installation.


i
x
.
c
o
m

compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 13

w
w
w
.
c
o
m
Figure 14 Apache Service Monitor

p
16. To check the installation of both services, open a browser and change to the following addresses:

u
• For Tomcat: http://localhost:8080

n
• For Apache: http://localhost

e
t
i
x
.
c
o
m

Figure 15 Local Host Apache Tomcat Web Site

Compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 14
w
w
w
.
c
o
m

Figure 16 Localhost Apache WebSite


p

17. When validation of both services is complete, open both the tomcat manager and the Apache manager
u

from the taskbar icons, and shutdown both services.


n

18. copy the mod_jk-1.2.14-apache-2.0.54.so file to the modules folder of Apache. In a default
e

installation this folder will be C:\Program Files\Apache Group\Apache2\modules. Rename this file to
t

mod_jk.so
i

19. Change directories to the Tomcat installation and open the server.xml file found in the conf directory.
x

Typically this file will be found in C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf
.

20. Find the following section <Server port="8005" shutdown="SHUTDOWN">. On the next line enter the
c

following:
o

<!-- Apache Config BEGIN MOD -->


m

<Listener className="org.apache.jk.config.ApacheConfig" modJk="C:/Program Files/Apache


Group/Apache2/modules/mod_jk.so"
workersConfig="C:/Program Files/Apache Software Foundation/Tomcat 5.5/conf/workers.properties"
/>
<!-- Apache Config END MOD -->
Make sure that the referenced directories are correct.
• ClassName = this will stay the same in all situations.
• ModJk = this points to the mod_jk.so file that you copied to the modules folder.
• WorkersConfig = this points to the workers.properties file.

compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 15

21. Next Scroll down until you see the section:


<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
22. Add the following immediately following that section:
<!-- Apache Config BEGIN MOD -->
<Listener className="org.apache.jk.config.ApacheConfig" append="true" forwardAll="false"
modJk="C:\Program Files\Apache Group\Apache2\modules\mod_jk.so" />

w
<!-- Apache Config END MOD -->

w
Make sure that the modJk is pointing to the correct location of the module.

w
23. Restart Tomcat. This will create a new directory called auto in the [tomcat]/conf subdirectory. This

.
auto directory will contain a file called mod_jk.conf.

c
24. Change directrories to the Apache installation, and open the httpd.conf file located in the C:\Program

o
Files\Apache Group\Apache2\conf

m
25. Scroll to the very bottom of the httpd.conf file and enter in the following include statement:

p
include "C:/Program Files/Apache Software Foundation/Tomcat 5.5/conf/auto/mod_jk.conf"

u
The include statement should point to the location of the mod_jk.conf created in step 23. Note the

n
direction of the slashes for the directories. Save the httpd.conf file and restart Apache.

e
26. At this point in the installation, Apache should be redirecting servlet and jsp requests to Tomcat. To

t
test the configuration, open the following web pages, and try some of the examples:

i
http://localhost/servlets-examples/

x
.
c
o
m

Compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 16
w
w
w
.
c
o
m

Figure 17 Apache - Tomcat Integration Servlet Examples


p

http://localhost/jsp-examples/
u
n
e
t
i
x
.
c
o
m

Figure 18 Apache - Tomcat Integration JSP examples


27. Proceed to

compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 17

Configuration Procedure for Sample Skin

4 IIS 5.0/6.0 - Tomcat 5.5 Installation Procedure


This procedure will install Microsoft IIS with Tomcat 5.5. This procedure assumes that IIS is already
installed on the server PC.
1. Run the Java development Kit setup executable supplied with the installation (jdk-1_5_0_05-windows-
i586-p.exe). This version of CONTEXWeb and Tomcat requires that version 1.5 and higher (Java 5.0) of
the JDK is installed.

w
w
w
.
c
o
m
p
u
n
e
t
i
x
.
c
o
Figure 19 JDK Installation

m
2. Note the location of the install

Compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 18
w
w
w
.
c
o
m
p
u

Figure 20 JDK Custom Setup


n

3. The installer will automatically install the JRE environment as well.


e

4. Set the JAVA_HOME setting in the environment settings. To do this open the control panel, then
t

double click on the System settings. Choose the Advanced tab, and click on the Environment variables
i

button. Add a new System variable called JAVA_HOME and set it to the newly installed JDK. Make sure
x

that the variable value points to the jdk and not the jre. When done click OK and close the
.

environmental variables and System properties windows.


c
o
m

Figure 21 Setting the JAVA_HOME


5. Run the Tomcat installation procedure. Do this by executing the apache-tomcat-5.5.12.exe
application. This version of CONTEXWeb requires Tomcat version 5.0 and higher.

compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 19

w
w
w
.
c
o
m
p
u
Figure 22 Tomcat Installation Procedure

n
6. When prompted to install specific components, choose to perform a full installation. This installs the

e
Tomcat service, native dlls, examples and webapps.

t
i
x
.
c
o
m

Compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 20
w
w
w
.
c
o
m
p
u

Figure 23 Tomcat Setup Components


n

7. Installing to the default folder is acceptable.


e
t
i
x
.
c
o
m

compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 21

w
w
w
.
c
o
m
p
u
Figure 24 Tomcat Default Installation location

n
8. The tomcat installation should serve on port 8080, define the Administrator login.

e
t
i
x
.
c
o
m

Compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 22
w
w
w
.
c
o
m
p
u

Figure 25 Tomcat Configuration


n

9. The installer should find the location of the JDK that was just installed. Click install to install the
e

servlet engine.
t
i
x
.
c
o
m

compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 23

w
w
w
.
c
o
m
p
u
Figure 26 Tomcat JVM location

n
10. When complete, the installation program will ask you if you want to start the tomcat service. Choose

e
yes. An icon will show up in the taskbar. Double-clicking this icon will bring up the Tomcat Properties

t
window. This application allows you to start and stop the Tomcat Service.

i
x
.
c
o
m

Compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 24
w
w
w
.
c
o
m
p
u
n

Figure 27 Tomcat Services Monitor


e

11. Stop the IIS Web Server Service. To do this, open the services from the control panel, stop the “World
t

Wide Web Publishing Service.”


i
x
.
c
o
m

Figure 28 Stopping IIS Service

compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 25

12. Now install the IIS/Tomcat web connector. Do this by running the isapi-redirect-1.2.14.exe
executable. Remember the location of the installation.

13. Next, open IIS Services Manager from the Administrative Tools.

w
w
w
.
c
o
m
p
u
n
e
Figure 29 IIS Manager

t
i
14. Select the Default Web Site (or the Web site running on this PC)

x
.
c
o
m

Compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 26
w
w
w
.
c
o
m
p
u
n
e

Figure 30 Default Web Site


t
i

15. Right click on the default web site icon, select Properties.
x

16. Select the ISAPI Filters Tab. If an ISAPI filter named Jakarta already exists, then proceed to step 20,
.

otherwise proceed to step 17 to install the Jakarta Isapi filter.


c
o
m

compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 27

w
w
w
.
c
o
m
p
u
n
e
t
Figure 31 Jakarta ISAPI Filter

i
17. Click on Add to add a new ISAPI filter.

x
18. Set the Filter name to “Jakarta”, set the executable to the location of the newly installed Tomcat

.
Connector isapi-redirect.dll. The filter name should include the dll name. An example would be:

c
“C:\Program Files\Apache Software Foundation\Jakarta Isapi Redirector\bin\isapi_redirect.dll”.

o
19. Click on “OK” to save the configuration.

m
20. In some installs of IIS 6.0 it will be necessary to run in IIS 5.0 Isolation mode. To enable this feature,
go to the folder named “Web Sites” in the Manager settings, right click on the icon and select the
properties. Choose the tab called “Services” and then check the box next to the text “Run WWW
Service in IIS 5.0 Isolation mode.”

Compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 28
w
w
w
.
c
o
m
p
u
n
e
t

Figure 32 Web Service Isolation Mode


i

21. If Installing in IIS 6.0, right click on Web Services Extensions, and add a new web service extension.
x

Call the web service “Jakarta” and point the required files to the location of the isapi_redirect.dll
.

file, “C:\Program Files\Apache Software Foundation\Jakarta Isapi Redirector\bin\isapi_redirect.dll”.


c

Check the box to “Set to Allowed” and then save the new Web Service Extension.
o
m

compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 29

w
w
w
.
c
o
m
p
u
n
e
Figure 33 Allowing Web Service Extension Jakarta

t
i
22. Restart Tomcat and then IIS. Make sure that the IIS Service and Web Site are back up and running.

x
23. At this point in the installation, IIS should be redirecting servlet and jsp requests to Tomcat. To test

.
the configuration, open the following web pages, and try some of the examples:

c
o
http://localhost/servlets-examples/

Compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 30
w
w
w
.
c
o

Figure 34 IIS - Tomcat Integration Servlet Examples


m

http://localhost/jsp-examples/
p
u
n
e
t
i
x
.
c
o
m

Figure 35 IIS - Tomcat Integration JSP Examples


24. Proceed to

compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 31

Configuration Procedure for Sample Skin

w
w
w
.
c
o
m
p
u
n
e
t
i
x
.
c
o
m

Compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 32

5 Configuration Procedure for Sample Skin


This procedure will install the sample skin provided by compunetix. This procedure assumes that Tomcat
is setup and configured to work with either IIS or Apache. This procedure also assumes that an CONTEX
Access Server is configured and setup to connect to a bridge. The CONTEX Access Server should have a
client manager that is serving on port 7100.
1. Change directories to the Tomcat installation. Create a CtxWeb directory under the webapps folder in
Tomcat.
w

2. Create a jsp directory under the CtxWeb directory


w

3. Create a WEB-INF directory under the CtxWeb directory.


w

4. place the web.xml file in the WEB-INF directory.


.

5. Unzip webview_1000_jsp.zip to the jsp directory.


c

6. create a lib directory under WEB-INF


o

7. Copy CONTEXWeb3000.jar to the lib directory just created.


m

8. Copy log4j-1.2.12.jar to the [Tomcat]\shared\lib directory.


p

9. Create a directory C:\ContexWeb\Templates


u

10. Unzip the skin, WebView_1000_template.zip to the newly created templates directory.
n

11. Create a directory, ContexWeb under the root documents folder of IIS or Apache. In apache, the root
e

directory is [Apache]\htdocs. In IIS the root directory is C:\InetPub\wwwroot\


t

12. Unzip the htdocs, WebView_1000_htdocs.zip to the newly created ContexWeb directory
i

The following steps 13-16 are important in IIS after creating a new Context (step 1, creating the CtxWeb
x

directory) These steps is not necessary in Apache configurations.


.

13. open the uriworkermap.properties file. This file is usually located in the C:\Program Files\Apache
c

Software Foundation\Jakarta Isapi Redirector\conf directory. The location is determined when


o

installing the Tomcat Connector for IIS.


m

14. Find the following location:


/manager/*=wlb
/jsp-examples/*=wlb
/servlets-examples/*=wlb
15. add a section for Contexweb, “ /CtxWeb/*=wlb “
16. The file should resemble the following:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</head>

compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 33

<P># uriworkermap.properties - IIS<BR>


#<BR>
# This file provides sample mappings for example wlb<BR>
# worker defined in workermap.properties.minimal<BR>
# The general syntax for this file is:<BR>
# [URL]=[Worker name]
</P>
<P>/admin/*=wlb

w
/manager/*=wlb

w
/jsp-examples/*=wlb

w
/servlets-examples/*=wlb

.
/CtxWeb/*=wlb

c
</P>

o
m
<P># Optionally filter out all .jpeg files inside that context<BR>
# For no mapping the url has to start with exclamation (!)

p
</P>

u
n
<P>!/servlets-examples/*.jpeg=wlb

e
</P>

t
<P>#<BR>

i
# Mount jkstatus to /jkmanager<BR>

x
# For production servers you will need to<BR>

.
# secure the access to the /jkmanager url<BR>

c
#<BR>

o
/jkmanager=jkstatus</P>

m
17. Open the CONTEXWeb.ini file located at C:\Contexweb\Webview\Contexweb.ini. Make sure that the
CONTEX Access Server section is pointing to the correct IP address and port.
18. Restart Tomcat to read in the new configuration.
19. Start the CONTEX Access Server if it is not already started.
20. Restart Apache.
21. Open the web page in your IE browser:
http://localhost/contexweb/webview/login.htm
22. Enter in a name and the billing code of a conference that is currently active on the connected bridge
and press submit to view the conference.
23. Installation is complete.

Compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 34

6 Configuration Procedures for Database


Connectivity.
With CONTEXWeb version 3.00.0 there are two different ways of accessing a database for authentication
purposes. CONTEXWeb provides its own version of connection pooling and also allows the system
administrator to configure a Tomcat Database Connection Pool resource (DBCP). Both of these methods
allow the user to configure a database connection using either an ODBC connection or a direct JDBC
driver connection.
w

6.1 CONTEXWeb Connection Pooling


w

CONTEXWeb connection pooling is configured in the CONTEXWeb INI file. The database can be an
w

ODBC resource or a JDBC compatible database.


.

6.1.1 ODBC resource


c
o

1. Shutdown tomcat.
m

2. Setup the ODBC resource in Windows. This example uses ContexWeb as the database name.
p

3. Open the CONTEXWeb.ini file.


u

4. Set the following parameters in the [UserAuthentication] section:


n

DatabaseConnectionType=0
e

DefaultDatabaseURL=jdbc:odbc:
t

DefaultDatabaseDriver=sun.jdbc.odbc.JdbcOdbcDriver
i

DefaultDatabaseName=ContexWeb
x

DefaultDatabaseUserName=
.
c

DefaultDatabasePassword=
o

5. Restart Tomcat.
m

6.1.2 JDBC database


1. Shutdown tomcat.
2. Copy the JDBC driver jar file to the [Tomcat]/common/lib folder.
3. Open the CONTEXWeb.ini file.
4. Set the following parameters in the [UserAuthentication] section:
DatabaseConnectionType=0
DefaultDatabaseURL= jdbc:firebirdsql:128.3.7.61/3050:/Program Files/Firebird/Databases/
DefaultDatabaseDriver= org.firebirdsql.jdbc.FBDriver
DefaultDatabaseName=CtxWeb.fdb

compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 35

DefaultDatabaseUserName=sysuser
DefaultDatabasePassword=dbad78
5. This example shows how to connect to a Firebird database. The particular database you will
be connecting to will require a certain formatting of the URL. In addition the default database
driver parameter will require a specific class which depends on the database being configured.
6. Restart Tomcat.

6.2 Tomcat Database Connection Pool Resource

w
To utilize Tomcat’s Database Connection Pool Resources, the databases must be setup in the web.xml

w
and server.xml and then the database will be available to CONTEXWeb to access. The database can
be an ODBC resource or a JDBC compatible database.

w
.
6.2.1 ODBC resource

c
1. Shutdown tomcat

o
2. Setup the ODBC resource in Windows. This example uses ContexWeb as the database name.

m
3. Open the file server.xml found in [Tomcat]/conf

p
4. Scroll until you reach the end of the host section: </Host>

u
5. A sample server.xml is included in the SUPPORT SOFTWARE package.

n
6. Add the following right before the </Host>

e
<Context path="/CtxWeb"

t
debug="5" reloadable="true" crossContext="true">

i
x
.
<!-- maxActive: Maximum number of dB connections in pool. Make sure you

c
configure your mysqld max_connections large enough to handle

o
all of your db connections. Set to 0 for no limit.

m
-->

<!-- maxIdle: Maximum number of idle dB connections to retain in pool.


Set to -1 for no limit. See also the DBCP documentation on this
and the minEvictableIdleTimeMillis configuration parameter.
-->

<!-- maxWait: Maximum time to wait for a dB connection to become available


in ms, in this example 10 seconds. An Exception is thrown if
this timeout is exceeded. Set to -1 to wait indefinitely.

Compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 36

-->

<!-- username and password: MySQL dB username and password for dB connections -->

<!-- driverClassName: Class name for the old mm.mysql JDBC driver is
org.gjt.mm.mysql.Driver - we recommend using Connector/J though.
Class name for the official MySQL Connector/J driver is com.mysql.jdbc.Driver.
-->
w
w

<!-- url: The JDBC connection url for connecting to your MySQL dB.
w

The autoReconnect=true argument to the url makes sure that the


.

mm.mysql JDBC Driver will automatically reconnect if mysqld closed the


c

connection. mysqld by default closes idle connections after 8 hours.


o
m

-->
p

<Resource name="jdbc/ContexWeb" auth="Container" type="javax.sql.DataSource"


u
n

maxActive="100" maxIdle="30" maxWait="10000"


e

username="" password="" driverClassName="sun.jdbc.odbc.JdbcOdbcDriver"


t

url="jdbc:odbc:ContexWeb"/>
i
x
.

</Context>
c

7. This example is creating a DB resource for the CtxWeb context and database ContexWeb. If
o

you need to create a database resource for another resource, then you will need to add in the
m

same configuration, changing the name CtxWeb. If you call your database something different,
then modify the name and url parameters. Save the server.xml file when done.
8. Open the web.xml file found in the WEB-INF folder of the CtxWeb context (Or the context you
are using)
9. Add a section for the database resource right before the </webapp>
<resource-ref>
<description>ContexWeb Database</description>
<res-ref-name>jdbc/ContexWeb</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>

compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 37

</resource-ref>
10. Make any changes to this reference if necessary. Save the web.xml file.
11. Open the ContexWeb.ini file for this skin.
12. Set the following parameters in the [UserAuthentication] section.
DatabaseConnectionType=1
DBResourceName=jdbc/ContexWeb
Where DBResourceName is the name of the resource reference name you defined in the
web.xml file.

w
13. Save the ContexWeb.ini file

w
14. Restart Tomcat.

w
6.2.2 JDBC database

.
c
1. Shutdown tomcat

o
2. Copy the JDBC driver jar file to the [Tomcat]/common/lib folder.

m
3. Open the file server.xml found in [Tomcat]/conf

p
4. Scroll until you reach the end of the host section: </Host>

u
5. A sample server.xml is included in the SUPPORT SOFTWARE package.

n
6. Add the following right before the </Host>

e
<Context path="/CtxWeb"

t
debug="5" reloadable="true" crossContext="true">

i
x
.
<!-- maxActive: Maximum number of dB connections in pool. Make sure you

c
configure your mysqld max_connections large enough to handle

o
all of your db connections. Set to 0 for no limit.

m
-->

<!-- maxIdle: Maximum number of idle dB connections to retain in pool.


Set to -1 for no limit. See also the DBCP documentation on this
and the minEvictableIdleTimeMillis configuration parameter.
-->

<!-- maxWait: Maximum time to wait for a dB connection to become available


in ms, in this example 10 seconds. An Exception is thrown if
this timeout is exceeded. Set to -1 to wait indefinitely.

Compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 38

-->

<!-- username and password: MySQL dB username and password for dB connections -->

<!-- driverClassName: Class name for the old mm.mysql JDBC driver is
org.gjt.mm.mysql.Driver - we recommend using Connector/J though.
Class name for the official MySQL Connector/J driver is com.mysql.jdbc.Driver.
-->
w
w

<!-- url: The JDBC connection url for connecting to your MySQL dB.
w

The autoReconnect=true argument to the url makes sure that the


.

mm.mysql JDBC Driver will automatically reconnect if mysqld closed the


c

connection. mysqld by default closes idle connections after 8 hours.


o
m

-->
p

<Resource name="jdbc/CtxWebFirebird" auth="Container" type="javax.sql.DataSource"


u
n

maxActive="100" maxIdle="30" maxWait="10000"


e

username="sysdba" password="masterkey"
driverClassName="org.firebirdsql.jdbc.FBDriver"
t
i

url="jdbc:firebirdsql:128.3.7.61/3050:/Program
x

Files/Firebird/Databases/CtxWeb.fdb"/>
.
c
o

</Context>
m

7. This example is creating a DB resource for the CtxWeb context and database ContexWeb. If
you need to create a database resource for another resource, then you will need to add in the
same configuration, changing the name CtxWeb. If you call your database something different,
then modify the name and url parameters. Save the server.xml file when done.
8. Open the web.xml file found in the WEB-INF folder of the CtxWeb context (Or the context you
are using)
9. Add a section for the database resource right before the </webapp>
<resource-ref>
<description>ContexWeb Database</description>
<res-ref-name>jdbc/CtxWebFirebird </res-ref-name>

compunetix
Confidential
1/6/2006
CONTEXWeb Installation Procedure
Version 3.00.0
Page 39

<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
10. Make any changes to this reference if necessary. Save the web.xml file.
11. Open the ContexWeb.ini file for this skin.
12. Set the following parameters in the [UserAuthentication] section.
DatabaseConnectionType=1
DBResourceName= jdbc/CtxWebFirebird

w
Where DBResourceName is the name of the resource reference name you defined in the

w
web.xml file.

w
13. Save the ContexWeb.ini file

.
14. Restart Tomcat.

c
o
m
p
u
n
e
t
i
x
.
c
o
m

Compunetix
Confidential
1/6/2006

You might also like