Sun ONE Application Server 7 Developer's Guide to NSAPI |
About This GuideThis book discusses how to use Netscape Server Application Programmer's Interface (NSAPI) to build plugins that use Server Application Functions (SAFs) to extend and modify Sun Open Net Environment (Sun ONE) Application Server 7. It also provides a reference of the NSAPI functions you can use to define new SAFs.
This preface contains information about the following topics:
- NSAPI Plugins and J2EE Web Applications
- Who Should Use This Guide
- Using the Documentation
- How This Guide Is Organized
- Documentation Conventions
- Product Support
NSAPI Plugins and J2EE Web Applications
In Sun ONE Application Server, NSAPI plugins cannot interoperate with J2EE web applications. Specifically:
- Do not place NSAPI plugins within web application context roots.
- Do not include the output of NSAPI plugins in servlets or JSPs.
- Do not forward requests to NSAPI plugins from servlets or JSPs.
- If you use security-constraint and filter-mapping features in the default web application, NSAPI features may not work as expected.
Who Should Use This Guide
The intended audience for this guide is the person who develops, assembles, and deploys NSAPI plugins in a corporate enterprise.
This guide assumes you are familiar with the following topics:
- HTTP
- HTML
- NSAPI
- C programming
- Software development processes, including debugging and source code control
Using the Documentation
The Sun ONE Application Server manuals are available as online files in Portable Document Format (PDF) and Hypertext Markup Language (HTML) formats, at:
The following table lists tasks and concepts described in the Sun ONE Application Server manuals. The left column lists the tasks and concepts, and the right column lists the corresponding manuals.
How This Guide Is Organized
This book has the following modules:
- "Syntax and Use of obj.conf"
This module describes the configuration file obj.conf. The module discusses the syntax and use of directives in this file, which instruct the server how to process HTTP requests.
- "Predefined SAFs and the Request Handling Process"
This module discusses each of the stages in the HTTP request handling process, and provides an API reference of the Server Application Functions (SAFs) that can be invoked at each stage.
- "SAFs in the init.conf File"
This module discusses the SAFs you can set in the configuration file init.conf to configure the Sun ONE Application Server during initialization.
- "Creating Custom SAFs"
This module discusses how to create your own plugins that define new SAFs to modify or extend the way the server handles requests.
- "Examples of Custom SAFs"
This module describes examples of custom SAFs to use at each stage in the request handling process.
- "NSAPI Function Reference"
This module presents a reference of the NSAPI functions. You use NSAPI functions to define SAFs.
- "Creating Custom Server-Parsed HTML Tags"
This module explains how to create custom server-parsed HTML tags.
- "Data Structure Reference"
This module discusses some of the commonly used NSAPI data structures.
- "Wildcard Patterns"
This module lists the wildcard patterns you can use when specifying values in obj.conf and various predefined SAFs.
- "Time Formats"
This module lists time formats.
- "Dynamic Results Caching Functions"
This module explains how to create a results caching plugin.
- "HyperText Transfer Protocol"
This module gives an overview of HTTP.
- "Alphabetical List of Pre-defined SAFs"
"Alphabetical List of NSAPI Functions and Macros"
These modules provide alphabetical lists for easy lookup of predefined SAFs and NSAPI functions.
Documentation Conventions
This section describes the types of conventions used throughout this guide:
General Conventions
The following general conventions are used in this guide:
- File and directory paths are given in UNIX® format (with forward slashes separating directory names). For Windows versions, the directory paths are the same, except that backslashes are used to separate directories.
- URLs are given in the format:
http://server.domain/path/file.html
In these URLs, server is the server name where applications are run; domain is your Internet domain name; path is the server's directory structure; and file is an individual filename. Italic items in URLs are placeholders.
- Font conventions include:
The monospace font is used for sample code and code listings, API and language elements (such as function names and class names), file names, pathnames, directory names, and HTML tags.
Italic type is used for code variables.
Italic type is also used for book titles, emphasis, variables and placeholders, and words used in the literal sense.
Bold type is used as either a paragraph lead-in or to indicate words used in the literal sense.
- Installation root directories for most platforms are indicated by install_dir in this document. Exceptions are noted in Conventions Referring to Directories.
By default, the location of install_dir on most platforms is:
Solaris 8 non-package-based Evaluation installations:
user's home directory/sun/appserver7
Solaris unbundled, non-evaluation installations:
/opt/SUNWappserver7
Windows, all installations:
C:\Sun\AppServer7
For the platforms listed above, default_config_dir and install_config_dir are identical to install_dir. See Conventions Referring to Directories for exceptions and additional information.
- Instance root directories are indicated by instance_dir in this document, which is an abbreviation for the following:
default_config_dir/domains/domain/instance
- UNIX-specific descriptions throughout this manual apply to the Linux operating system as well, except where Linux is specifically mentioned.
Conventions Referring to Directories
By default, when using the Solaris 8 and 9 package-based installation and the Solaris 9 bundled installation, the application server files are spread across several root directories. These directories are described in this section.
- For Solaris 9 bundled installations, this guide uses the following document conventions to correspond to the various default installation directories provided:
install_dir refers to /usr/appserver/, which contains the static portion of the installation image. All utilities, executables, and libraries that make up the application server reside in this location.
default_config_dir refers to /var/appserver/domains, which is the default location for any domains that are created.
install_config_dir refers to /etc/appserver/config, which contains installation-wide configuration information such as licenses and the master list of administrative domains configured for this installation.
- For Solaris 8 and 9 package-based, non-evaluation, unbundled installations, this guide uses the following document conventions to correspond to the various default installation directories provided:
install_dir refers to /opt/SUNWappserver7, which contains the static portion of the installation image. All utilities, executables, and libraries that make up the application server reside in this location.
default_config_dir refers to /var/opt/SUNWappserver7/domainswhich is the default location for any domains that are created.
install_config_dir refers to /etc/opt/SUNWappserver7/config, which contains installation-wide configuration information such as licenses and the master list of administrative domains configured for this installation.
Product Support
If you have problems with your system, contact customer support using one of the following mechanisms:
- The online support web site at:
- The telephone dispatch number associated with your maintenance contract
Please have the following information available prior to contacting support. This helps to ensure that our support staff can best assist you in resolving problems:
- Description of the problem, including the situation where the problem occurs and its impact on your operation
- Machine type, operating system version, and product version, including any patches and other software that might be affecting the problem
- Detailed steps on the methods you have used to reproduce the problem
- Any error logs or core dumps