Administration Guide
Overview Guide
Installation Guide
Previous Next Contents



Using the Sample Applications
Once you have the Netscape Application Server installed and running, you can use the sample applications provided to ensure that the server is working properly. The sample applications also provide a means of testing and learning about this product.

Netscape Application Server offers sample applications written in both C++ and Java. The following table lists the sample applications provided and describes the application and the language in which it was developed.

Sample Application
Description
Development Language
Hello
Simple application displaying "Hello World" statement when AppLogic object is invoked.

C++
Sample
Three-in-one application demonstrating simple AppLogic execution.

Java and C++
Office Catalog
E-commerce application demonstrating session management and more complicated database access with online product purchasing.

Java
CalHoops
Basketball-statistic generating application demonstrating database connection and result set caching.

Java and C++
States
Population statistic generating application demonstrating database connection and result set caching.

Java and C++
Online Bank
Online customer banking application demonstrating security and session management.
Java

Configuring the Sample Applications and Files
Configuring the sample applications consists of connecting to the database, loading the sample data into the database, and configuring the sample data source. The applications can access the data sources through an ODBC database driver or through a native database driver.

Netscape supplies configuration and data-loading files to simplify the population of the database with the sample application data. These files are for UNIX and Windows NT operating systems.

For installations of Netscape Application Server on the UNIX operating system, there are shell scripts that handle the configuration tasks. There are separate scripts for each database into which you are going to load the data. The scripts can be used for the following databases:

Solaris
Oracle, Informix, Sybase, DB2

HPUX
Oracle, Informix, Sybase (C++ only), DB2 (C++ only)

There are also separate shell scripts for each sample application that performs database access. These files are located in the DB directory of the appropriate application.

Before you run the shell script, you should edit the login and password of the script to match that of your database administrator account.

Connecting to the database is done using the database vendor's client utilities or by invoking the shell scripts from the shell prompt. The shell scripts invoke the programs necessary to connect to the database, configure the sample application account, and invoke the SQL files used to populate the database with the data.

After you run the appropriate script, you need to configure the new data source so that the application can access the data. The sample applications can access the database through an ODBC driver or through a native database driver.

For configuring native database drivers, you can use the client utilities provided with the database, or you can edit the appropriate data source name file. The databases vendors provide the following client utilities for accessing their databases:

For more information about these vendor utilities, see the documentation provided with the utilities.

Configuring the data source for an ODBC driver requires that you edit the odbc.ini file to reflect the new data source name and server ID. Use the entries already in the file as a guide to add the new data source.

The following tasks are automated by invoking the appropriate shell script for your database. The shell scripts are provided with the sample applications.

To configure the sample applications for UNIX

  1. Make sure the destination database is running and that you have modified the shell scripts login and password to match that of your database administrator account.
  2. To connect to the database and load the data, do one of the following:
  3. <NAS installation directory>/APPS/GXApp/load_ora.sh

    <NAS installation directory>/APPS/GXApp/load_mssql.sh

    <NAS installation directory>/APPS/GXApp/load_ifmx.sh

    <NAS installation directory>/APPS/GXApp/load_db2.sh

    You can also invoke these files from within the database client utilities. Make sure you connect to the database as a system user.

    The sample data is loaded when the shell script finishes running.

  4. To configure the new data source for access through a native driver, do one of the following:
  5. The sample data source is now configured and can be accessed by the sample applications.

 

© Copyright 1998 Netscape Communications Corporation