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 Windows NT operating system, you invoke a batch file to create the sample application account and set up the database for the sample application data. After running the appropriate batch file for your specific database, you need to run the appropriate SQL file to load the sample application data. Each type of database into which you are going to load the data has separate files. The database types are as follows:

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

Before you run the batch files that set up the database, you should edit the login and password of the file to match those of your database administrator account.

After you run the appropriate batch and SQL files, 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:

You can use the ODBC Data Source Manager to configure the new data sources through an ODBC driver.

For more information about the vendor utilities or the ODBC manager, see the documentation provided with the utilities.

The following tasks are automated by running the appropriate batch files for your database. The batch files are provided with the sample applications.

To configure sample applications for Windows NT

  1. Make sure the destination database is running and that you have modified the batch file's 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, where NAS21 is the default installation directory:
  3. <drive>:\NAS21\Apps\GXApp\load_ora.bat

    <drive>:\NAS21\Apps\GXApp\load_syb.bat

    <drive>:\NAS21\Apps\GXApp\load_ifmx.bat

    <drive>:\NAS21\Apps\GXApp\load_mssql.bat

    <drive>:\NAS21\Apps\GXApp\load_db2.bat

    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 SQL file finishes running.

  4. If you are going to access the database through an ODBC driver, use the ODBC Data Source Manager and add ksample as a data source name and a database name. You can also directly edit the odbc.ini file.
  5. To configure the new data source for access through a native driver, do one of the following:
  6. The sample data source is now configured and can be accessed by the sample applications.

 

© Copyright 1998 Netscape Communications Corporation