ISBN-10:
020141970X
ISBN-13:
9780201419702
Pub. Date:
09/25/1998
Publisher:
Addison-Wesley
Programming Applications for Netscape Servers / Edition 1

Programming Applications for Netscape Servers / Edition 1

by Kaveh Gh. Bassiri

Paperback

Current price is , Original price is $49.95. You
Select a Purchase Option (Book and CD Rom)
  • purchase options

Product Details

ISBN-13: 9780201419702
Publisher: Addison-Wesley
Publication date: 09/25/1998
Edition description: Book and CD Rom
Pages: 975
Product dimensions: 7.42(w) x 9.20(h) x 1.58(d)

Read an Excerpt

PREFACE:

When I first began working as a consultant for Netscape, I had not planned on writing a book about the Netscape Server. At that time, the Netscape Server was only an enhanced version of the original NCSA HTTP Server written by Rob McCool. I was excited about the potential for developing Internet applications. Netscape was the first company to add an API to server programming options. The use of this API (NSAPI) opened a whole new realm of possibilities. I worked with Netscape to provide support, instruction, and examples for the Netscape Server. While working on NSAPI sample applications, I noticed the lack of essential information and resources. NSAPI was a new programming model, and its examples and documentation were sparse and rudimentary.

After my talk on NSAPI at the Netscape Developer Conference, I was asked to write a book on Netscape Server. I was hesitant. After all, I was busy developing and there was no time to write. Working as a Netscape server developer and training different Web administrators and programmers, however, I knew what other developers needed. What finally persuaded me to write such a book was the need.

So, I set out to write the book. I planned to write a book that discusses programming and technical issues not covered by other resources. I wanted to respond to some of the most frequently asked questions about the Netscape Server and how to extend it. I wanted the reader to gain not only a general review of server management and programming issues, but also an in-depth understanding of key programming options and different server configuration settings. My intended readers are experienced Webmasters who need tounderstand how the server works and how to customize its features, as well as developers who need to program for the Netscape Server.

In this book, server administrators will find information about the workings of the server, about how the server processes a request and the variety of server configuration settings. Programmers will find a review of different programming options for extending the server's processing of client requests. This book includes API reviews, examples, and walk-through tutorials for writing server applications. The programming options for Server 3.5.1 are so numerous that a single book cannot cover all the topics with meaningful study. This book focuses in on a review of CGI, NSAPI, CORBA, and WAI. CGI is the traditional server programming option and provides a good starting point. NSAPI is the least documented and most in need of a detailed discussion. CORBA opens the door for future methods of extending the server. WAI, itself a CORBA implementation, is the way of the future.

There still remains the problem of writing a book about a server that is updated so quickly. In this book, I try to address programming issues for anyone who runs a Netscape Server from Server 1.x to 3.5.1. Since many of you are using the latest version of the server or are planning to update to the latest version, I have focused on Enterprise Server 3.5.1. I kept in mind those who are still using earlier versions of the servers and made efforts to provide information about all the earlier servers. Much of the information covered in this book should remain the same for the future Netscape Server 4.x.

To supplement the materials in this book with more recent documents, you should always check Netscape DevEdge Online site ...

Table of Contents

Preface xxv(4)
Acknowledgments xxix
Part I Introduction to Netscape Server 1(106)
Chapter 1 Introduction
3(34)
Key Components of the Web
5(1)
URL and URI
6(2)
TCP/IP
8(1)
HTTP
8(10)
History of HTTP
8(1)
Brief Overview of HTTP
9(1)
HTTP Request/Response Messages
10(2)
Request
12(1)
Request-Line
13(1)
General Headers
14(1)
Request Headers
15(1)
Entity Headers
15(1)
Example of a Request
16(1)
Response
16(1)
Status-Line
16(1)
General, Response, and Entity Headers
17(1)
Example of a Response
18(1)
Additional Request and Response Headers
18(1)
Evolution of the Netscape Server
18(13)
Programming Options for Netscape Server
22(1)
CGI
22(1)
NSAPI
23(1)
Server-Side Java Applet
24(1)
Java Servlet
25(1)
Server-Side JavaScript and LiveWire
25(1)
LiveConnect
26(1)
CORBA/IIOP
26(2)
WAI
28(1)
Additional Programming Options for Server 3.x
28(2)
Note on Installing Netscape Server
30(1)
About This Book
31(6)
What Is Covered in This Book
31(5)
Organization of the Book
36(1)
Chapter 2 Netscape Servers Configuration
37(70)
The Administration Server
39(13)
Distributed Administration
45(2)
Administration Server Files
47(2)
The Server Manager
49(3)
Wildcard Options
52(2)
Wildcard Characters
52(2)
Main Server Configuration Files
54(44)
magnus.conf
56(1)
Conventions
57(1)
Other Syntax
58(1)
obj.conf
59(1)
A Simple obj.conf
60(2)
Syntax in the obj.conf File
62(1)
Order in the obj.conf File
63(1)
Initialization
64(1)
Default Object and Order of the Functions
64(2)
A Note Regarding Client Information
66(1)
Additional Objects
66(1)
Creating an Object
67(1)
Using the Server Manager to Create an Object
67(1)
Creating an Object Manually
68(1)
Creating an Object with ppath Association
68(1)
Creating an Object by Name Association
69(1)
Directives
70(1)
Init
71(2)
Auth Trans
73(2)
Name Trans
75(2)
PathCheck
77(3)
ObjectType
80(1)
Service
81(4)
AddLog
85(1)
access Log
85(1)
errors Log
86(1)
Other Log Files
87(1)
[secure] keysize Log
87(1)
[user-agent] Log
87(1)
pid Log
88(1)
agent.log
88(1)
Examining Log Files
88(1)
Error
89(2)
Common Error Types
91(1)
Client
92(2)
Software Virtual Server
94(1)
mime.types
95(3)
User Database
98(4)
User Database for Server 3.x
99(3)
System User Account for the Server
102(2)
Summary
104(3)
Part II Traditional Server Programming Options 107(82)
Chapter 3 CGI Programming and More
109(80)
Server-Side Include (Server-Parsed HTML)
110(5)
SSI Commands Supported by Netscape
113(2)
Imagemap
115(3)
ISINDEX
118(6)
CGI (Common Gateway Interface)
124(62)
Configuring the Server for CGI Programs
125(2)
Configuring the Server for ShellCGI and WinCGI
127(3)
How CGI Works
130(1)
A Closer Look at CGI
131(1)
The Server Thread and the CGI Process
132(1)
Data Provided by the Server
132(2)
CGI Environment Variables
134(1)
1. Global Variables
135(1)
2. Variables Specific to a CGI Request
135(4)
3. Netscape-Specific Environment Variable
139(1)
4. Additional HTTP Headers
139(2)
5. Secured Server Environment Variables
141(1)
Additional Variables
142(1)
Processing the Request
142(1)
The CGI Program Response
142(2)
Returning a Redirect
144(1)
Returning a New Document
145(1)
Returning a Custom Error Page
146(1)
Nonparsed Headers
147(1)
Hello Client Examples
147(1)
ANSIC
148(1)
ShellCGI (Perl)
149(3)
WinCGI (Visual Basic)
152(3)
Guest Book Example in ANSIC
155(23)
Stepping Through the Guest Book Example
178(8)
Summary
186(3)
Part III NSAPI 189(378)
Chapter 4 What Is NSAPI?
191(18)
Generally Speaking...
192(2)
Server API
194(1)
Platform Differences
194(2)
NSAPI 2.x versus NSAPI 1.x
196(2)
NSAPI 3.x
198(3)
Running Earlier Versions of NSAPI Applications with Server 3.x
200(1)
Writing NSAPI Applications Using Perl and Python
201(1)
Comparison with Other Server APIs
201(4)
NSAPI versus ICAPI
201(1)
NSAPI versus ISAPI
202(3)
NSAPI versus CGI
205(2)
Summary
207(2)
Chapter 5 NSAPI Fundamentals
209(74)
Header Files
210(1)
Data Structures
211(33)
Func, FuncPtr, and FuncStruct
211(1)
pblock
212(2)
Session
214(2)
Request Data Structure
216(2)
pblock (vars) for the Server Variables
218(2)
Request pblock (reqpb)
220(1)
Headers pblock (headers)
221(2)
Server Header pblock (srvhdrs)
223(2)
Other Request Data Structure Variables
225(2)
File-Related Data Structures
227(1)
SYS_FILE
227(1)
filebuffer (and filbuf or filbuf_t)
228(2)
finfo (stat)
230(1)
cinfo
231(1)
Socket-Related Data Structures
232(1)
SYS_NETFD
232(1)
sockaddr_in (and sockaddr)
233(1)
netbuf
233(1)
Directory-Related Data Structures
234(1)
Memory-Related Data Structures
235(1)
shmem_s
235(1)
pool_handle_t
236(1)
Configuration File Data Structures
237(1)
directive
237(1)
dtable
238(1)
httpd_object
238(1)
httpd_objset
238(1)
conf_global_vars_s
239(3)
nsapi_dispatch_s (Server 3.x only)
242(1)
Thread-Related Data Structures
243(1)
Important NSAPI Functions
244(37)
pblock and param Functions
244(1)
Creating and Freeing Parameter Block Entries
244(1)
Creating, Copying, and Freeing Parameter Blocks
245(1)
Finding and Removing Parameter Block Entries
245(1)
Finding the Value of a Parameter Block Entry
246(1)
Inserting Parameters into a pblock
246(1)
Converting pblock Entries into Environment Variables
247(1)
Converting pblock Entries into Strings, and Vice Versa
247(2)
Request Functions
249(1)
Finding the Value of a Request Header
249(1)
Getting stat Information on the Requested File
250(1)
Protocol Functions
250(1)
Setting the HTTP Protocol Status
251(1)
Sending Headers to the Client
251(1)
Updating File stat
252(1)
net and netbuf Functions
252(1)
Reading Data from the Network Socket
253(1)
Putting Bytes into the Network Buffer's inbuf
253(1)
Reading Data from the Network Buffer into Your Buffer
254(1)
Reading Data from the Network Buffer One Character at a Time
254(1)
Writing the Entity-Body to the Client's Socket
255(1)
Sending Bytes to the Socket
256(1)
Verifying the Domain Name
256(1)
File I/O Functions
257(1)
file_(*) Functions
257(1)
System Functions
258(1)
Opening a File
258(1)
Locking and Unlocking a File
259(1)
Reading from and Writing to a File
259(1)
Positioning the File Pointer
260(1)
Closing the File
260(1)
filebuf Functions
261(1)
Opening a File Buffer
261(1)
Reading from the File Buffer One Character at a Time
262(1)
Reaching the End of the File (Server 3.x)
263(1)
Putting Bytes into the File Buffer's inbuf
263(1)
Sending the File Buffer to the Socket
263(1)
Closing the File Buffer
263(2)
Func Functions
265(1)
Finding a Predefined Server Function
266(1)
Executing a Server Function
266(1)
Inserting or Renaming a Function into the Function Table
267(1)
Utility Functions
268(1)
Formatting and Placing a String into a String Buffer
268(1)
Comparing Strings
269(1)
Using Wildcards to Check a String
269(1)
Reading a Line from a File Buffer
270(1)
Converting an Integer to a String
270(1)
Manipulating Environment Variables
270(1)
Getting the Server Host Name
271(1)
Checking and Updating the URI
271(1)
Verifying the Client Browser Version
272(1)
Time Functions
272(2)
Comparing Times
274(1)
Memory Management Functions
274(1)
Allocating and Freeing Memory Blocks from the Memory Pool
275(1)
Allocating and Freeing Memory Blocks from the Heap
275(1)
Other Functions
276(1)
Logging an Error
276(1)
Running a Clean-up Function at Restart or Shutdown
277(2)
Returning the Last Error
279(1)
Getting the Content Information Data Structure
280(1)
Getting the Client DNS Address
280(1)
Summary
281(2)
Chapter 6 Writing a Server Application Function
283(64)
SAF Prototype
284(2)
C++ and NSAPI
286(1)
Include Files
286(1)
Sending Data to the Client
287(19)
Returning a Dynamic Page
287(1)
Step 1. Remove content-type
288(1)
Steps 2 and 3. Insert New Headers
289(1)
Step 4. Set Status to OK
290(1)
Step 5. Send Status-Line and Headers
290(1)
Step 6. Create the Response
291(1)
Step 7. Send Data
291(1)
Step 8. Error Checking
291(1)
Step 9. Exit Your SAF
292(1)
Hello Client Example
292(2)
Redirecting the Client
294(1)
Redirecting the Client with a Location Header
294(1)
Using a Partial URL for Location
295(2)
Using an Absolute URL for Location
297(1)
Redirecting the Client with a url pblock Entry
298(1)
Redirection Examples
299(1)
Returning an Error Page
300(1)
HTTP Status Codes
301(5)
Returning a Page Through an Error Function
306(1)
Logging Errors
306(5)
Logging Errors for an Init Directive
310(1)
Obtaining Data
311(34)
CGI Environment Variables and NSAPI Variables
312(1)
NSAPI Equivalents for CGI Environment Variables
313(6)
Data Received from the Server
319(1)
NSAPI Variables
320(1)
Global Variables
320(3)
Session Variables
323(1)
Request Variables
324(5)
param Variables
329(1)
Examples of Obtaining NSAPI Variables
329(1)
NSAPI Variables Equivalent to Environment Variables
330(8)
Writing Variables from the Server pblock Data Structures
338(3)
Reading Data from a Socket or Network Buffer
341(4)
Additional Information
345(1)
Summary
345(2)
Chapter 7 Compile, Install, and Debug NSAPI Applications
347(18)
Compiling Your Code
347(6)
Compiling for UNIX
349(2)
Compiling for Windows
351(2)
Registering SAFs
353(7)
Alternative to Using the mime.types File for Service Functions
357(1)
Registering for Netscape NT Server 1.x
358(2)
Debugging Your SAF
360(3)
Debugging for UNIX
361(1)
Debugging for Windows
362(1)
Remote Debugging for Windows
363(1)
Instructions for the Local Machine
363(1)
Instructions for the Remote Machine
364(1)
Summary
364(1)
Chapter 8 SAF and Server Directives
365(68)
Server Directives
366(61)
Init (Initializing Global Static Variables)
367(2)
Netscape Security Model and Client Authentication
369(4)
Auth Trans (Authenticating Clients)
373(1)
How the Client Gets Authenticated
374(3)
Writing a User-Defined basic-auth Function
377(1)
Writing Your Own Auth Trans Function
377(1)
Auth Trans Example
378(5)
Notes on NT User Logon API
383(1)
NameTrans
384(1)
Name Trans (Determining the System Path)
384(3)
Name Trans (Creating Additional Objects)
387(1)
PathCheck
388(1)
PathCheck (Requiring Authorization)
388(2)
PathCheck (Verifying the System Path)
390(2)
Object Type (Specifying MIME Types)
392(1)
Service (Processing Requests and Returning Pages)
393(4)
Addlog (Producing Customized Log Files)
397(1)
Steps for Writing a Customized Log Program
398(1)
Customized Log Example
399(1)
Example of Variables Logged by the pblock_log Function
409(15)
Error (Customized Server Error Response)
424(1)
Writing an Error Function
425(2)
SAF Return Values and Order of the Directive Functions
427(4)
Summary
431(2)
Chapter 9 Processing Form Input
433(60)
mailto Program-A GET Example
434(19)
mailto HTML Page
436(2)
Instructions for Blat
438(2)
Registration Instructions
440(8)
Stepping Through the mailto Program
448(3)
Sending HTML Mail
451(2)
Parsing Functions
453(11)
Alternative remove_separator_plus
461(3)
guestbook Program-A POST Example
464(19)
Registration Instructions
465(14)
Stepping Through the guestbook Program
479(4)
A General-Purpose formresponse Function
483(8)
Registration Instructions
484(7)
Stepping Through the formresponse Program
491(1)
Summary
491(2)
Chapter 10 Additional Programming Issues
493(44)
Maintaining State (Persistent Data)
494(26)
Examples of Persistent Client Data
496(1)
Producing and Maintaining State Information
497(1)
URL Encoding
497(1)
Client IP Address
498(1)
Cookies
499(1)
Server-Side Persistent Data
500(1)
Additional Options
501(1)
More About Cookies
502(1)
Netscape Cookie File
502(2)
Set-Cookie Response-Header
504(2)
IETF Set-Cookie2 Response-Header
506(1)
Cookie HTTP Request-Header
507(1)
Updating or Deleting a Cookie
508(1)
Cached Cookies
508(1)
Cookie Example-newuser
509(1)
Registration Instructions
510(8)
Stepping Through the newuser Program
518(2)
Maintaining a Connection Using Push and Pull
520(12)
Client Pull
522(1)
Server Push
523(2)
Server Push Example-wait
525(2)
Registration Instructions
527(4)
Stepping Through the wait Program
531(1)
Customized Server Tags and Template Files
532(2)
Using a Database with NSAPI
534(1)
Summary
535(2)
Chapter 11 Threads and Processes
537(30)
More on Threads and Processes
538(6)
Processes
540(1)
Threads
540(1)
Kernel-Level Threads
541(1)
User-Level Threads
541(1)
Combination of User-Level and Kernel-Level Threads
542(1)
Netscape Thread Models
542(2)
Process and Thread-Related Server Settings
544(3)
magnus.conf Directives
545(1)
MaxProcs
545(1)
Max Threads and Min Threads
545(1)
magnus.conf Directives for Server 3.x
546(1)
Rq Throttle and Rq ThrottleMinPerSocket
546(1)
kernel Threads
546(1)
StackSize
546(1)
Native Threads Parameter of load-modules
547(1)
NSAPI Data Structures and Functions
547(18)
Using Other Libraries with Your NSAPI Application
548(1)
Process and Thread Data Structures
549(1)
SEMAPHORE and COUNTING_SEMAPHORE
550(1)
SYS_THREAD
550(1)
CRITICAL
551(1)
CONDVAR
551(1)
Process and Thread Functions
551(1)
SEMAPHORE and COUNTING_SEMAPHORE Functions
552(1)
SEMAPHORE Functions
553(1)
COUNTING_SEMAPHORE Functions
554(1)
System Thread (systhread_(*)) Functions
555(1)
Start a Thread
555(1)
Get the Current Thread and Make a Thread a Netscape Thread
556(1)
Create, Set, and Get Thread-Private Data
556(1)
Change a Thread's Timing
556(1)
Terminate a Thread
557(1)
New System Thread Functions for Server 3.x
557(1)
CRITICAL and CONDVAR Functions
557(1)
CRITICAL Functions
558(1)
Critical Section Example
559(2)
CONDVAR Functions
561(4)
Summary
565(2)
Part IV CORBA/IIOP and WAI 567(266)
Chapter 12 CORBA and Netscape ISB
569(52)
CORBA
571(24)
CORBA, CORBA Objects, and Object Implementation
572(1)
ORB and Netscape ISB
573(1)
IIOP
573(2)
Object Reference and Interoperable Object Reference
575(1)
IOR
576(1)
CORBA Services and the Naming Service
577(2)
Netscape Naming Service
579(1)
C++ Naming Service
580(3)
Java Naming Service
583(4)
Object Adapter and BOA
587(1)
OAD
588(2)
IDL
590(2)
IDL Complier
592(2)
Language Mapping
594(1)
Steps of Writing a CORBA Client/Server Application
595(16)
Overview of Steps for Writing a CORBA Client/Server Application
595(2)
Write a CORBA IDL Interface (Step 1)
597(1)
Compile the IDL File with the Netscape IDL Compiler (Step 2)
598(1)
C++ Generated Files
599(2)
Java-Generated Files
601(1)
Write an Interface Implementation (Step 3)
602(1)
Write the Client and Server CORBA Applications (Steps 4 and 6)
603(1)
The Client Application (Step 4)
604(2)
The Server Application (Step 6)
606(2)
Additional Notes
608(1)
Java Applications
608(1)
Compiling and Running the Client and Server Applications (Steps 5 and 7)
609(2)
Alternatives to the Server Skeleton and Client Stub
611(3)
Dynamic Invocation Interface (DII)
612(1)
Dynamic Skeleton Interface (DSI)
613(1)
Threads
614(2)
Multiple Threads in ISB for C++
614(1)
Multiple Threads in ISB for Java
615(1)
Important Settings for Java ISB and Naming Service
616(1)
Netscape CORBA Offerings
617(1)
Summary
618(3)
Chapter 13 Web Application Interface (WAI)
621(24)
WAI versus NSAPI and CGI
624(1)
WAI versus Other Java Programming Options
625(1)
Benefits and Drawbacks of WAI
626(1)
When to Use WAI
627(4)
Security Issues with Netscape ISB and WAI
628(3)
Enabling WAI on the Server
631(11)
Checking with osagent and osfind
632(1)
Changes to the obj.conf File
633(6)
IIOPinit Parameters
639(3)
Log Verbose
642(1)
Summary
642(3)
Chapter 14 WAI Fundamentals
645(50)
CORBA and WAI
646(13)
WAI IDL Files
647(1)
server.idl
648(1)
HttpServerContext
648(2)
HttpServerRequest
650(1)
1. Getting Request- and Client-Related Information
650(2)
2. Getting Additional Information
652(1)
3. Setting, Getting, and Deleting Response-Headers
652(1)
4. Sending the Response and Headers
653(1)
5. Additional Methods
654(4)
WebAppService.idl and WAIWebApplicationService
658(1)
NSAPI and WAI Methods
659(8)
Using NSAPI Functions with WAI Applications
665(2)
Target Language Files, Classes, Methods, and Functions
667(26)
WAI C and C++ Files
668(1)
ONEiiop.h--C Header File
669(2)
WAIWebApplicationService-Related C Functions
671(2)
HttpServerContext--and HttpServerRequest-Related C Functions
673(3)
ONEsrvPI.hpp--C++ Header File
676(1)
WAIWebApplicationService Class
676(3)
WAIServerContext and WAIServerRequest Classes
679(2)
FormHandler.h--FormHandler Class for C++
681(3)
WAI Java Classes and Method Files
684(2)
WAIWebApplicationService Class
686(2)
HttpServerContext and HttpServerRequest Classes
688(3)
FormHandler Class
691(2)
Summary
693(2)
Chapter 15 Writing a WAI Application
695(72)
Brief Overview of a WAS in Action
696(3)
Steps for Writing a WAS
699(65)
Files to Include with the Code
701(1)
Part I: Write a Web Service Class (for Java and C++ Only)
701(1)
Constructors for C++
702(1)
Constructors for Java
703(1)
getServiceInfo
704(1)
Additional Member Methods or Variables
705(1)
Part II: Process the Client Request
706(3)
Get Information for Processing the Client Request
709(1)
Global Data Passed to Your Program
710(2)
Server Information
712(1)
Request- or Client-Related Information
713(2)
Client Input
715(1)
FormHandler Class
716(1)
FormHandler for Java-An Example
717(3)
FormHandler for C++-An Example
720(4)
Finishing the Client Request
724(1)
Note on Preparing Data to Be Sent to the Client
724(1)
Netscape Stream and Stream Buffer Classes for C++
725(1)
Returning the Response
726(1)
Getting an Existing Response-Header
726(1)
Deleting a Response-Header
727(1)
Adding a Response-Header
728(2)
Sending the Response-Headers
730(2)
Writing the Body of the Response
732(1)
Additional Steps
732(1)
Logging Errors
732(1)
Redirecting a Client
733(4)
Part III: Write the Main Function for WAS
737(1)
An Out-of-Process WAI Application
737(2)
WAI Out-of-Process Main Function-An Overview
739(2)
Writing a WAI Out-of-Process Main Function
741(1)
C, C++ Console Application Main Function (main)
741(1)
C, C++ Windows Application Main Function (WinMain)
742(1)
Java Application Main Function (main)
742(1)
Writing a WAI In-Process "Main" Function
743(2)
In-Process WAI SAF Function in C
745(1)
In-Process WAI SAF Function in C++
746(1)
Creating and Registering a Web Service Object
747(1)
Creating a Web Service Object in C
747(1)
Creating a Web Service Object in C++ and Java
748(1)
C++
748(1)
Java
749(1)
Registering Your Service
750(2)
Registering Your Service with an SSL-Enabled Server
752(1)
Additional Steps for the Out-of-Process WAI Main Function
753(1)
WAI Implementation Loop
754(1)
C
754(1)
C++
754(1)
Java
755(1)
Windows API
755(2)
Special Steps for Java
757(1)
Persistent Data and WAI
758(6)
Summary
764(3)
Chapter 16 WAI Examples
767(66)
Hello Client Examples
768(21)
Out-of-Process WAI Console Examples
769(1)
Hello Client in C
769(3)
Hello Client in C++
772(3)
Hello Client in Java
775(5)
Out-of-Process WAI Windows Example
780(7)
In-Process WAI Example
787(2)
Compiling Your WAI Application
789(6)
Compiling a C or C++ WAI Application
790(1)
Step 1. Choosing a Compiler
790(1)
Step 2. Include Files Directories
791(1)
Step 3. Necessary Libraries and Program Paths
791(3)
Step 4. Compiler Flags
794(1)
Compiling an In-Process WAI Application
795(1)
Compiling a Java Application
795(1)
Starting a WAI Application
795(6)
Starting an Out-of-Process WAI Application
796(1)
Registering an In-Process WAI Application
797(1)
Running a WAI Remotely
798(1)
Registering an Out-of-Process WAI Application with OAD
799(2)
Debugging a WAI Application
801(1)
Guest Book Example in C
801(3)
Adding NSAPI Functions to the Guest Book
828(3)
Summary
831(2)
Appendix A magnus.conf Directives
833(18)
ACLFile
833(1)
ACLCacheLifetime (Server 3.5.1)
834(1)
AcceptLanguage (Server 3.x)
834(1)
Address
834(1)
AdminLanguage (Server 3.x)
835(1)
AsyncDNS (Server 3.x)
835(1)
Certfile
835(1)
Chroot (UNIX)
836(1)
Ciphers and SSL3Ciphers
836(1)
ClientLanguage (Server 3.x)
837(1)
DaemonStats (UNIX Server 3.x)
838(1)
DefaultLanguage (Server 3.x)
838(1)
DNS
838(1)
ErrorLog
839(1)
Init (Server 1.x)
839(1)
KeepAliveTimeout
839(1)
KernelThreads (Server 3.x)
840(1)
Keyfile
840(1)
ListenQ (Server 3.x and UNIX Server 2.x)
840(1)
LoadObjects
841(1)
LogVerbose (Server 3.x)
841(1)
MaxKeepAliveConnection (Server 3.x)
841(1)
MaxProcs (UNIX Server 1.x and 2.x)
842(1)
MaxThreads (UNIX Server 2.x)
842(1)
MinThreads (UNIX Server 2.x)
843(1)
MtaHost (Server 3.x)
843(1)
NntpHost (Server 3.x)
844(1)
Personal (IRIX 2.x and 3.x)
844(1)
PidLog (UNIX)
844(1)
Port
844(1)
ProcessLife (UNIX 1.x)
844(1)
RqThrottle (Server 3.x)
845(1)
RqThrottleMinPerSocket (Server 3.x)
845(1)
RootObject
845(1)
Security
845(1)
ServerCert
846(1)
ServerID (Enterprise Server 3.5.1)
846(1)
ServerKey
846(1)
ServerName
846(1)
ServerRoot
846(1)
SSL2
847(1)
SSL3
847(1)
SSL3Ciphers
847(1)
SSLClientAuth
847(1)
SSLSessionTimeout
847(1)
SSL3SessionTimeout
848(1)
StackSize (Server 3.x)
848(1)
TerminateTimeout (Server 3.x)
848(1)
User (UNIX)
848(3)
Appendix B obj.conf Directive Functions
851(52)
The Init Functions
855(10)
acl-set-default-method (Server 3.x)
855(1)
cache-init (Server 2.x and 3.x)
855(1)
cindex-init
856(1)
dns-cache-init (Server 2.x and 3.x)
857(1)
flex-init
857(1)
IIOPinit (Server 3.x)
858(1)
init-cgi
859(1)
init-clf
859(1)
init-uhome (UNIX)
860(1)
load-modules
861(1)
load-types
861(1)
pool-init (Server 2.x and 3.x)
862(1)
user-defined
862(1)
flex-init and Formatting Log Files
862(1)
The AuthTrans Functions
865(2)
basic-auth
865(1)
basic-ncsa
866(1)
get-sslid
867(1)
The NameTrans Functions
867(5)
assign-name
867(1)
document-root
868(1)
home-page
869(1)
mozilla-redirect
869(1)
pfx2dir
870(1)
redirect
871(1)
unix-home (UNIX)
871(1)
user-defined
872(1)
The PathCheck Functions
872(11)
cert2user (Enterprise Server 2.x)
872(1)
check-acl
873(1)
deny-existence
874(1)
find-index
874(1)
find-links (UNIX)
875(1)
find-pathinfo
876(1)
get-client-cert (Enterprise Server)
876(1)
htaccess-find (Enterprise Server 3.x)
877(1)
load-config
878(2)
ntcgicheck (NT)
880(1)
nt-uri-clean (NT)
880(1)
require-auth
881(1)
set-cache-control (Server 3.x)
882(1)
unix-uri-clean (UNIX)
883(1)
user-defined
883(1)
The Object Type Functions
883(3)
force-type
883(1)
image-switch
883(1)
shtml-hacktype
884(1)
type-by-exp
884(1)
type-by-extension
885(1)
user-defined
886(1)
The Service Functions
886(12)
append-trailer
886(1)
deny-existence
887(1)
IIOPexec (Server 3.x)
887(1)
IIOPNameService (Server 3.x)
888(1)
imagemap
889(1)
index-common
889(1)
index-simple
890(1)
key-toosmall
890(1)
parse-html
891(1)
query-handler
891(1)
send-cgi
892(1)
send-error
893(1)
send-file
894(1)
send-range
895(1)
send-shellcgi (NT)
895(1)
send-wincgi (NT)
896(1)
user-defined
897(1)
The AddLog Functions
898(2)
common-log
898(1)
flex-log
898(1)
record-keysize
899(1)
record-user-agent
899(1)
user-defined
899(1)
The Error Functions
900(3)
key-toosmall
900(1)
query-handler
900(1)
send-error
901(1)
user-defined
901(2)
Appendix C ACL Files
903(12)
ACL for Server 2.x
906(2)
ACL for Server 3.x
908(7)
General Conventions
908(1)
ACL identifier
909(1)
Authentication Statement
910(1)
Authorization Statement
911(4)
Appendix D Dynamic Configuration of the Server
915(14)
.nsconfig
916(5)
Directives for the Files Tags
919(1)
AddType
919(1)
ErrorFile
919(1)
RestrictAccess
920(1)
RequireAuth
921(1)
.htaccess
921(8)
.htaccess Directives
924(1)
AuthType
924(1)
AuthName
925(1)
AuthUserFile
925(1)
AuthGroupFile
925(1)
Limit
925(1)
deny
926(1)
allow
926(1)
order
926(1)
require
927(2)
Appendix E Header Files Included with Server 2.x
929(10)
Server 2.x versus Server 1.x
930(1)
List of Header Files
931(8)
Appendix F osagent and osfind
939(6)
osagent
939(3)
osfind
942(3)
Index 945

What People are Saying About This

John Dawes

This book will provide a comprehensive resource for developers building Web-based applications on Netscape Server products. With detailed explanations of server internals and configuration methods, this book is a tremendous resource for programmers who are serious about leveraging the power and functionality of Netscape Server products.

Preface

When I first began working as a consultant for Netscape, I had not planned on writing a book about the Netscape Server. At that time, the Netscape Server was only an enhanced version of the original NCSA HTTP Server written by Rob McCool. I was excited about the potential for developing Internet applications. Netscape was the first company to add an API to server programming options. The use of this API (NSAPI) opened a whole new realm of possibilities. I worked with Netscape to provide support, instruction, and examples for the Netscape Server. While working on NSAPI sample applications, I noticed the lack of essential information and resources. NSAPI was a new programming model, and its examples and documentation were sparse and rudimentary.

After my talk on NSAPI at the Netscape Developer Conference, I was asked to write a book on Netscape Server. I was hesitant. After all, I was busy developing and there was no time to write. Working as a Netscape server developer and training different Web administrators and programmers, however, I knew what other developers needed. What finally persuaded me to write such a book was the need.

So, I set out to write the book. I planned to write a book that discusses programming and technical issues not covered by other resources. I wanted to respond to some of the most frequently asked questions about the Netscape Server and how to extend it. I wanted the reader to gain not only a general review of server management and programming issues, but also an in-depth understanding of key programming options and different server configuration settings. My intended readers are experienced Webmasters who need to understand how the server works and how to customize its features and developers who need to program for the Netscape Server.

In this book, the server administrators will find information about the workings of the server -- about how the server processes a request and the variety of server configuration settings. Programmers will find a review of different programming options for extending the server's processing of client requests. This book includes API reviews, examples, and walk-through tutorials for writing server applications. The programming options for Server 3.5.1 are so many that no single book can cover all the topics with any meaningful study. This book focuses in on a review of CGI, NSAPI, CORBA and WAI. CGI is the traditional server programming option and provides a good starting point. NSAPI is the least documented and most in need of a detailed discussion. CORBA opens the door for future methods of extending the server. WAI, itself a CORBA implementation, is the way of the future.

There still remains the problem of writing a book about a server that is updated so quickly. In this book, I try to address programming issues for anyone who runs a Netscape Server from Server 1.x to 3.5.1. Since many of you are using the latest version of the server or are planning to update to the latest version, I have focused on Enterprise Server 3.5.1. I kept in mind those who are still using earlier versions of the servers and made sure to provide information about all the earlier servers. Much of the information covered in this book should remain the same for the future Netscape Server 4.x.

To supplement the materials in this book with more recent documents, you should always check Netscape DevEdge Online site (www.developer.netscape.com). You will find the latest revision of manuals, sample programs, articles, and other resources at this site. You should also check the Netscape Technical Support site (www.help.netscape.com) for the latest patches, FAQs, and Knowledge-base information. For the latest release notes, check Netscape's Web server directory (www.home.netscape.com/eng/server/webserver/). The release notes include important information about the latest updates, changes, and bugs. Netscape's online documentation provides the most current information about each version of the server. In an attempt to provide the most current information, much of this information may still be in revision. Online documents may be inaccurate or incomplete.

In this book, I have provided a tested review of the Netscape Server and its programming options. Although a printed book may not be as current as an online document, it has gone through a number of additional reviews and tests. Manuals or help files from a company usually provide the reference material and how-to instruction, but they do not provide an outsider's view. This book will include a number of warnings, bug reports, hints, and suggestions to assist you as a developer. The reason for the inclusion of this information is not to lessen the reputation of Netscape Server. Instead, this information helps you quickly find the source of a problem and lets you go on with developing server solutions.

I hope you will find this book a source of learning and resources, because I really wrote it for my friends and colleagues.

Customer Reviews

Most Helpful Customer Reviews

See All Customer Reviews