|
Table of Contents
|
Sun Java System Web Server 7.0 Update 5 NSAPI Developer's GuideThis guide discusses how to use Netscape Server Application Programmer's Interface (NSAPI) to build plug-ins that define Server Application Functions (SAFs) to extend and modify Sun Java System Web Server 7.0. The guide also provides a reference of the NSAPI functions you can use to define new plug-ins. Related Documents Sun Java System Web Server 7.0 Update 5 Documentation Center About NSAPIThis chapter provides an overview of the Netscape Server API (NSAPI). Creating Custom Server Application FunctionsThis chapter describes how to write your own NSAPI plug-ins that define custom Server Application Functions (SAFs). The ability to create custom plug-ins enables you to modify or extend the Sun Java System Web Server’s built-in functionality. For example, you can modify the server to handle user authorization in a special way or generate dynamic HTML pages based on information in a database. This chapter has the following sections:
Before writing custom SAFs, you must familiarize yourself with the request-handling process, as described in detail in the Sun Java System Web Server Administrator's Configuration File Reference. Also, before writing a custom SAF, check to see whether a built-in SAF already accomplishes the tasks you have in mind. See Appendix B: Alphabetical List of NSAPI Functions and Macros for a list of the predefined Init SAFs. For information about predefined SAFs used in the obj.conf file, see the Sun Java System Web Server Administrator's Configuration File Reference. For a complete list of the NSAPI routines for implementing custom SAFs, see NSAPI Function and Macro Reference. [Back to top] Creating Custom FiltersThis chapter describes how to create custom filters that can be used to intercept and possibly modify the content presented to or generated by another function. This chapter has the following sections:
Examples of Custom SAFs and FiltersThis chapter provides examples of custom Sever Application Functions (SAFs) and filters for each directive in the request-response process. You can use these examples as the basis for implementing your own custom SAFs and filters. For more information about creating your own custom SAFs, see Creating Custom Server Application Functions. For information about creating your own filters, see Creating Custom Filters. Before writing your own SAF, check to see whether an existing SAF serves your purpose. The predefined SAFs are discussed in the Sun Java System Web Server Administrator's Configuration File Reference. If you need to writer a custom SAF, you should be familiar with the request-response process and the role of the configuration file obj.conf. See the Sun Java System Web Server Administrator's Configuration File Reference for information on the obj.conf file. For a list of the NSAPI functions for creating new SAFs, see NSAPI Function and Macro Reference. This chapter has the following sections:
Creating Custom Server-Parsed HTML TagsThis chapter describes the procedure to create custom server-parsed HTML tags. This chapter contains the following section: [Back to top] NSAPI Function and Macro ReferenceThis chapter lists all the public C functions and macros of the Netscape Server Applications Programming Interface (NSAPI). Use these functions when writing your own Server Application Functions (SAFs) and filters. Each function provides the name, syntax, parameters, return value, a description of what the function does, and sometimes an example of its use and a list of related functions. For more information on data structures, see Data Structure Reference. For an alphabetical list of function names, see Appendix B: Alphabetical List of NSAPI Functions and Macros.
[Back to top] Data Structure ReferenceNSAPI uses many data structures that are defined in the nsapi.h header file, which is in the install-dir/include directory. This chapter describes public data structures in nsapi.h.
This chapter has the following section: Dynamic Results Caching FunctionsThe functions described in this chapter enables you to write a results caching plug-in for Sun Java System Web Server. A results caching plug-in, which is a Service SAF, caches data, a page, or part of a page in the web server address space, which the Web Server can refresh periodically on demand. An Init SAF initializes the callback function that performs the refresh. This chapter has the following sections: Appendix A: Hypertext Transfer ProtocolThe Hypertext Transfer Protocol (HTTP) is a protocol which is a set of rules that describes how information is exchanged, that enables a client such as a web browser and a Web Server to communicate with each other. HTTP is based on a request-response model. The browser opens a connection to the server and sends a request to the server. The server processes the request and generates a response, which it sends to the browser. The server then closes the connection. This chapter provides a short introduction to a few HTTP basics. For more information on HTTP, see the IETF home page at http://www.ietf.org/home.html. This chapter has the following section: Appendix B: Alphabetical List of NSAPI Functions and MacrosThis appendix provides an alphabetical list for the easy lookup of NSAPI functions and macros. [Back to top] |