Sign In
Upload
Manuals
Brands
Netscape Manuals
Server
ENTERPRISE SERVER 6.0
Netscape ENTERPRISE SERVER 6.0 Software Manuals
Manuals and User Guides for Netscape ENTERPRISE SERVER 6.0 Software. We have
2
Netscape ENTERPRISE SERVER 6.0 Software manuals available for free PDF download: Manual, Programmer's Manual
Netscape ENTERPRISE SERVER 6.0 Manual (368 pages)
NSAPI
Brand:
Netscape
| Category:
Server
| Size: 2 MB
Table of Contents
Table of Contents
3
About this Book
15
Chapter 1 Basics of Server Operation
17
Configuration Files
18
Magnus.conf
18
Server.xml
18
Obj.conf
19
Mime.types
19
Dynamic Reconfiguration
20
How the Server Handles Requests from Clients
20
HTTP Basics
20
Steps in the Request Handling Process
22
Directives for Handling Requests
23
Writing New Server Application Functions
23
Chapter 2 Syntax and Use of Obj.conf
25
Server Instructions in Obj.conf
25
Summary of the Directives
26
The Object Tag
29
Objects that Use the Name Attribute
29
Object that Use the Ppath Attribute
30
Variables Defined in Server.xml
31
Flow of Control in Obj.conf
32
Authtrans
32
Nametrans
32
How the Server Knows to Process Other Objects
33
Pathcheck
34
Objecttype
35
Forcing the Type
36
Service
37
Default Service Directive
39
Addlog
40
Error
40
Syntax Rules for Editing Obj.conf
41
Order of Directives
41
Parameters
41
Case Sensitivity
41
Separators
42
Quotes
42
Spaces
42
Line Continuation
42
Path Names
42
Comments
42
About Obj.conf Directive Examples
43
Chapter 3 Predefined Safs and the Request Handling Process
45
The Bucket Parameter
47
Authtrans Stage
48
Basic-Auth
49
Basic-Ncsa
51
Get-Sslid
52
Qos-Handler
52
Nametrans Stage
53
Assign-Name
54
Document-Root
55
Home-Page
56
Pfx2Dir
57
Redirect
59
Strip-Params
60
Unix-Home
60
Pathcheck Stage
61
Check-Acl
62
Deny-Existence
63
Find-Index
63
Find-Links
64
Find-Pathinfo
65
Get-Client-Cert
65
Load-Config
67
Nt-Uri-Clean
69
Ntcgicheck
70
Require-Auth
71
Set-Virtual-Index
72
Ssl-Check
72
Ssl-Logout
73
Unix-Uri-Clean
73
Objecttype Stage
74
Force-Type
75
Set-Default-Type
76
Shtml-Hacktype
77
Type-By-Exp
77
Type-By-Extension
78
Service Stage
79
Add-Footer
82
Add-Header
83
Append-Trailer
84
Imagemap
85
Index-Common
86
Index-Simple
88
Key-Toosmall
89
List-Dir
90
Make-Dir
91
Query-Handler
91
Remove-Dir
92
Remove-File
93
Rename-File
94
Send-Cgi
95
Send-File
97
Send-Range
99
Send-Shellcgi
99
Send-Wincgi
100
Service-Dump
101
Shtml_Send
102
Stats-Xml
103
Upload-File
104
Addlog Stage
105
Common-Log
105
Flex-Log
106
Record-Useragent
107
Error Stage
108
Send-Error
108
Qos-Error
109
Chapter 4 Creating Custom Safs
111
The SAF Interface
112
SAF Parameters
112
Pb (Parameter Block)
112
Sn (Session)
113
Rq (Request)
113
Result Codes
115
Creating and Using Custom Safs
115
Write the Source Code
116
Compile and Link
117
Linker Commands and Options for Generating a Shared Object
118
Additional Linker Flags
118
Compiler Flags
119
Load and Initialize the SAF
120
Instruct the Server to Call the Safs
121
Reconfigure the Server
123
Test the SAF
123
Overview of NSAPI C Functions
123
Parameter Block Manipulation Routines
124
Protocol Utilities for Service Safs
124
Memory Management
125
File I/O
125
Network I/O
126
Threads
126
Enterprise Serverutilities
127
Virtual Server
127
Required Behavior of Safs for each Directive
128
Init Safs
129
Authtrans Safs
129
Nametrans Safs
130
Pathcheck Safs
130
Objecttype Safs
130
Service Safs
130
Error Safs
131
Addlog Safs
131
CGI to NSAPI Conversion
131
Chapter 5 NSAPI Function Reference
135
NSAPI Functions (in Alphabetical Order)
135
Calloc
136
Cinfo_Find
136
Condvar_Init
137
Condvar_Notify
138
Condvar_Terminate
138
Condvar_Wait
139
Crit_Enter
139
Crit_Exit
140
Crit_Init
140
Crit_Terminate
141
Daemon_Atrestart
141
Fc_Open
142
Fc_Close
143
Filebuf_Buf2Sd
143
Filebuf_Close
144
Filebuf_Getc
144
Filebuf_Open
145
Filebuf_Open_Nostat
145
Free
146
Func_Exec
147
Func_Find
147
Log_Error
148
Malloc
149
Net_Ip2Host
150
Net_Read
150
Net_Write
151
Netbuf_Buf2Sd
151
Netbuf_Close
152
Netbuf_Getc
152
Netbuf_Grab
153
Netbuf_Open
153
Param_Create
154
Param_Free
154
Pblock_Copy
155
Pblock_Create
155
Pblock_Dup
156
Pblock_Find
156
Pblock_Findval
157
Pblock_Free
157
Pblock_Nninsert
158
Pblock_Nvinsert
158
Pblock_Pb2Env
159
Pblock_Pblock2Str
159
Pblock_Pinsert
160
Pblock_Remove
161
Pblock_Str2Pblock
161
Perm_Calloc
162
Perm_Free
162
Perm_Malloc
163
Perm_Realloc
164
Perm_Strdup
164
Prepare_Nsapi_Thread
165
Protocol_Dump822
166
Protocol_Set_Finfo
166
Protocol_Start_Response
167
Protocol_Status
168
Protocol_Uri2Url
169
Protocol_Uri2Url_Dynamic
169
Realloc
170
Request_Get_Vs
171
Request_Header
171
Request_Stat_Path
172
Request_Translate_Uri
173
Session_Dns
173
Session_Maxdns
174
Shexp_Casecmp
175
Shexp_Cmp
175
Shexp_Match
176
Shexp_Valid
177
Strdup
177
System_Errmsg
178
System_Fclose
178
System_Flock
179
System_Fopenro
179
System_Fopenrw
180
System_Fopenwa
180
System_Fread
181
System_Fwrite
181
System_Fwrite_Atomic
182
System_Gmtime
183
System_Localtime
183
System_Lseek
184
System_Rename
185
System_Ulock
185
System_Unix2Local
185
Systhread_Attach
186
Systhread_Current
186
Systhread_Getdata
187
Systhread_Newkey
187
Systhread_Setdata
188
Systhread_Sleep
188
Systhread_Start
189
Systhread_Timerset
189
Util_Can_Exec
190
Util_Chdir2Path
190
Util_Chdir2Path
191
Util_Cookie_Find
191
Util_Env_Find
192
Util_Env_Free
192
Util_Env_Replace
193
Util_Env_Str
193
Util_Getline
194
Util_Hostname
194
Util_Is_Mozilla
195
Util_Is_Url
195
Util_Itoa
196
Util_Later_Than
196
Util_Sh_Escape
197
Util_Snprintf
197
Util_Sprintf
198
Util_Strcasecmp
198
Util_Strftime
199
Util_Strncasecmp
200
Util_Uri_Escape
200
Util_Uri_Is_Evil
201
Util_Uri_Parse
201
Util_Uri_Unescape
202
Util_Vsnprintf
202
Util_Vsprintf
203
Vs_Alloc_Slot
204
Vs_Get_Data
204
Vs_Get_Default_Httpd_Object
205
Vs_Get_Doc_Root
205
Vs_Get_Httpd_Objset
206
Vs_Get_Id
206
Vs_Get_Mime_Type
207
Vs_Lookup_Config_Var
207
Vs_Register_Cb
208
Vs_Set_Data
208
Vs_Translate_Uri
209
Chapter 6 Examples of Custom Safs
211
Examples in the Build
212
Authtrans Example
213
Installing the Example
213
Source Code
214
Nametrans Example
215
Installing the Example
216
Source Code
217
Pathcheck Example
219
Installing the Example
219
Source Code
220
Objecttype Example
222
Installing the Example
223
Source Code
223
Service Example
224
Installing the Example
225
Source Code
225
More Complex Service Example
227
Addlog Example
228
Installing the Example
228
Source Code
228
Quality of Service Examples
230
Installing the Example
230
Source Code
230
Chapter 7 Syntax and Use of Magnus.conf
237
Init Safs
238
Enterprise Servercindex-Init
239
Define-Perf-Bucket
241
Dns-Cache-Init
242
Flex-Init
242
Flex-Rotate-Init
247
Init-Cgi
248
Init-Clf
249
Init-Uhome
251
Load-Modules
251
Nt-Console-Init
252
Perf-Init
253
Pool-Init
253
Register-Http-Method
254
Stats-Init
255
Thread-Pool-Init
256
Server Information
257
Extrapath
257
Mtahost
258
Netsiteroot
258
Serverconfigurationfile
258
Serverid
258
Serverroot
258
Tempdir
259
Tempdirsecurity
259
User
259
Language Issues
260
Adminlanguage
260
Clientlanguage
261
Defaultcharset
261
Defaultlanguage
261
DNS Lookup
261
Asyncdns
261
Dns
262
Threads, Processes and Connections
262
Connqueuesize
264
Headerbuffersize
264
Iotimeout
264
Keepalivethreads
264
Keepalivetimeout
265
Kernelthreads
265
Listenq
265
Maxkeepaliveconnections
265
Maxprocs (UNIX Only)
266
Postthreadsearly
266
Rcvbufsize
266
Rqthrottle
266
Rqthrottlemin
267
Sndbufsize
267
Stacksize
267
Stricthttpheaders
267
Terminatetimeout
268
Threadincrement
268
Usenativepoll (UNIX Only)
268
Native Thread Pools
268
Nativepoolstacksize
269
Nativepoolmaxthreads
269
Nativepoolminthreads
269
Nativepoolqueuesize
269
Cgi
270
Cgiexpirationtimeout
270
Cgistubidletimeout
270
Cgiwaitpid (UNIX Only)
271
Maxcgistubs
271
Mincgistubs
271
Wincgitimeout
271
Error Logging and Statistic Collection
272
Errorlog
272
Errorlogdateformat
273
Logflushinterval
273
Logverbose
273
Logvsid
273
Pidlog
273
Acl
274
Aclcachelifetime
274
Aclusercachesize
275
Aclgroupcachesize
275
Security
275
Sslcacheentries
276
Sslclientauthdatalimit
276
Sslclientauthtimeout
276
Sslsessiontimeout
277
Ssl3Sessiontimeout
277
Chunked Encoding
277
Useoutputstreamsize
277
Chunkedrequestbuffersize
278
Chunkedrequesttimeout
278
Miscellaneous
279
Childrestartcallback
279
Httpversion
279
Maxrqheaders
279
Umask (UNIX Only)
280
Chapter 8 Virtual Server Configuration Files
281
The Server.dtd File
281
The Server.xml File
282
Variables
284
Format of a Variable
285
The ID Variable
285
Variables Used in the Interface
285
Using the Server Manager and Class Manager
286
Elements in Server.dtd and Server.xml
287
Server
287
Vars
287
LS (Listen Socket)
288
Connectiongroup
289
Sslparams
290
Mime
291
Aclfile
292
Vsclass
292
VS (Virtual Server)
293
Qosparams
294
Userdb
295
Virtual Server Selection for Request Processing
295
User Database Selection
296
The Netscape LDAP Schema
297
The Convergence Tree
297
The Domain Component (DC)Tree
298
Appendix A Data Structure Reference
299
Privatization of some Data Structures
300
Session
300
Pblock
301
Pb_Entry
301
Pb_Param
302
Session->Client
302
Request
302
Stat
303
Shmem_S
304
Cinfo
304
Appendix B MIME Types
307
Introduction
307
Determining the MIME Type
308
How the Type Affects the Response
308
What Does the Client Do with the MIME Type
309
Syntax of the MIME Types File
310
Sample MIME Types File
310
Appendix C Wildcard Patterns
313
Wildcard Patterns
313
Wildcard Examples
314
Appendix D Time Formats
315
Appendix E Hypertext Transfer Protocol
317
Compliance
317
Requests
318
Request Method, URI, and Protocol Version
318
Request Headers
318
Request Data
319
Responses
319
HTTP Protocol Version, Status Code, and Reason Phrase
319
Response Headers
321
Response Data
321
Buffered Streams
322
Appendix F Dynamic Results Caching Functions
326
Dr_Cache_Destroy
326
Dr_Net_Write
328
Advertisement
Netscape ENTERPRISE SERVER 6.0 Programmer's Manual (130 pages)
Guide to Servlets
Brand:
Netscape
| Category:
Server
| Size: 0 MB
Table of Contents
Table of Contents
3
About this Book
7
Chapter 1 Servlets and Javaserver
9
Web Applications
9
Servlets
10
Javaserver Pages
10
Chapter 2 Web Applications
13
Web Application Structure
13
Dynamic Reconfiguration
14
Web.xml Clarifications
15
Login-Config
15
Security-Constraint
15
Session-Timeout
15
The Web-Apps.xml File and Virtual Servers
16
The Default Context for a Virtual Server
16
Example Server.xml File
16
Example Web-Apps.xml File
18
Web-Apps.xml Element Reference
19
Auth-Native
19
Class-Loader
20
Description
20
Filter, Filter-Mapping
20
Form-Login-Session
21
Init-Param
21
Jsp-Servlet
21
Param-Name
22
Param-Value
22
Parameter-Encoding
22
Response-Buffer
24
Response-Cookie
24
Role-Mapping
24
Session-Cookie
25
Session-Manager
25
Session-Tracking
25
Tempdir
26
Web-App
26
Deploying a Web Application Using Wdeploy
27
Web Application Examples
29
Chapter 3 Using Servlets
31
What Does the Server Need to Run Servlets
31
Using the User Interface
32
Enabling Servlets
32
Making Servlets Available to Clients
32
The <SERVLET> SHTML Tag
33
Servlet Output
34
Configuring JVM
35
Maximizing Servlet Performance
35
Chapter 4 Using Javaserver
37
What Does the Server Need to Run JSP
37
Configuring JRE/JDK Paths
39
Using the User Interface
41
Enabling Jsps
42
Making Jsps Available to Clients
42
Deleting Cache Version Files
42
The JSP Command-Line Compiler
43
Package Names Generated by the JSP Compiler
46
Specifying that Jsps Are Precompiled
46
Other JSP Initialization Parameters
47
JSP Tag Libraries and Standard Portable Tags
47
Chapter 5 Debugging Servlets and Jsps
49
Servlet Debugging
49
JSP Debugging
50
Generating a Stack Trace for Debugging
51
Using Forte for Java to Debug Servlets and Jsps
51
JPDA Options for Debugging
53
Chapter 6 Session Managers
55
Session Overview
55
Specifying a Session Manager
56
Nessessionmanager
58
Parameters for Nessessionmanager
58
Enabling Nessessionmanager
61
Source Code for Nessessionmanager
62
Mmapsessionmanager (UNIX Only)
63
Parameters
63
Enabling Mmapsessionmanager
64
Deleting Sessiondata Version Files
65
Deprecated Session Managers
65
Simplesessionmanager
65
Jdbcsessionmanager
67
Load Balancing, Session Failover, and Session Ids
70
Chapter 7 API Clarifications
73
Clarification of Httpsession Scope
73
Clarifications for Using Methods
74
Httpservlet.service
74
Servletcontext.getattribute
75
Servletrequest.setattribute
75
Servletrequest.getparameter
75
Servletresponse.getoutputstream and Getwriter
77
Requestdispatcher.forward and Include
77
Other Useful Information
79
Database Connection Pooling
79
Fetching the Client Certificate
79
Chapter 8 Legacy Servlet and JSP Configuration
81
The Default Virtual Server
81
Enabling Servlets and JSP
82
Making Jsps Available to Clients
82
Configuring Servlets in the Default Virtual Server
82
Configuring Global Servlet Attributes
83
Registering Servlet Directories
83
Registering Individual Servlets
85
Specifying Servlet Virtual Paths
86
Specifying Servlet Contexts
88
Using the User Interface
88
Legacy Configuration Files
89
Servlets.properties
90
Rules.properties
91
Contexts.properties
92
Legacy Examples
96
Maximizing Legacy Servlet Performance
97
Appendix A Servlet Settings in Magnus.conf and Obj.conf
99
Init Directives in Magnus.conf
99
Objects in Obj.conf
100
Directives for Registered Servlet Directories
102
JSP Directives
102
Appendix B Converting SSJS Applications
103
Differences between Javascript and Java
103
Javascript to Java Class Conversions
105
Conversion Steps
106
Example Conversion
107
Appendix C JVM Configuration
109
The Jvm12.Conf File
110
Using JVM Environment Variables
111
Jvm12.Conf Parameter Reference
112
Appendix D Remote Servlet Profiling
117
The Optimizeit! Profiler
117
The HPROF Profiler
118
Index
123
Advertisement
Related Products
Netscape NETSCAPE ENTERPRISE SERVER 6.0 - PROGRAMMER GUIDE TO SERVLETS
Netscape NETSCAPE ENTERPRISE SERVER 6.1 - PROGRAMMER GUIDE TO SERVLETS
Netscape ENTERPRISE SERVER 6.1
Netscape NETSCAPE ENTREPRISE SERVER 6.0 - INSTALLATION AND MIGRATION GUIDE
Netscape NETSCAPE ENTREPRISE SERVER 6.1 - INSTALLATION AND MIGRATION GUIDE
Netscape NETSCAPE ENTREPRISE SERVER 6.0 - ADMINISTRATOR
Netscape ENTREPRISE SERVER 6.1
Netscape NETSCAPE CONSOLE 6.0 - MANAGING SERVERS
Netscape NETSCAPE DIRECTORY SERVER 6.0
Netscape NETSCAPE DIRECTORY SERVER 6.0 - DEPLOYMENT
Netscape Categories
Server
Software
Gateway
More Netscape Manuals
Login
Sign In
OR
Sign in with Facebook
Sign in with Google
Upload manual
Upload from disk
Upload from URL