Documentation Home
> Sun Java System Web Server 6.1 SP11 NSAPI Programmer's Guide
Sun Java System Web Server 6.1 SP11 NSAPI Programmer's Guide
Book Information
Index
A
B
C
D
E
F
G
H
I
J
L
M
N
O
P
Q
R
S
T
U
V
W
Preface
Chapter 1 Syntax and Use of obj.conf
How the Server Handles Requests from Clients
HTTP Basics
NSAPI Filters
Request-handling Process
To handle request
Directives for Handling Requests
Dynamic Reconfiguration
Server Instructions in obj.conf
Summary of the Directives
Configuring HTTP Compression
The Object and Client Tags
The Object Tag
Objects that Use the name Attribute
Objects that Use the ppath Attribute
The Client Tag
Client Tag Parameters
Variables Defined in server.xml
Flow of Control in obj.conf
AuthTrans
NameTrans
How and When the Server Processes Other Objects
PathCheck
ObjectType
Setting the Type By File Extension
Forcing the Type
Input
Output
Service
Service Examples
Default Service Directive
AddLog
Error
Changes in Function Flow
Internal Redirects
Restarts
URI Translation
Syntax Rules for Editing obj.conf
Order of Directives
Parameters
Case Sensitivity
Separators
Quotes
Spaces
Line Continuation
Path Names
Comments
About obj.conf Directive Examples
Chapter 2 SAFs in the magnus.conf File
Init SAFs
Syntax
cindex-init
Parameters
Example
define-perf-bucket
Parameters
Example
See Also
dns-cache-init
Parameters
Example
flex-init
Parameters
More on Log Format
Examples
See Also
flex-rotate-init
Parameters
Example
See Also
init-cgi
Parameters
Example
init-clf
Parameters
Examples
See Also
init-dav
Parameters
Example
Example
init-filter-order
Parameters
Example
init-j2ee
Parameters
Example
init-uhome
Parameters
Examples
load-modules
Parameters
Examples
nt-console-init
Parameters
Example
perf-init
Parameters
Example
See Also
pool-init
Parameters
Example
register-http-method
Parameters
Example
stats-init
Parameters
Example
thread-pool-init
Parameters
Example
See Also
Chapter 3 Creating Custom SAFs
Future Compatibility Issues
The SAF Interface
SAF Parameters
pb (parameter block)
sn (session)
rq (request)
Result Codes
Creating and Using Custom SAFs
To create a custom SAF
Write the Source Code
Compile and Link
Include Directory and nsapi.h File
Libraries
Linker Commands and Options for Generating a Shared Object
Additional Linker Flags
Compiler Flags
Compiling 3.x Plugins on AIX
Load and Initialize the SAF
Instruct the Server to Call the SAFs
Restart the Server
Test the SAF
Overview of NSAPI C Functions
Parameter Block Manipulation Routines
Protocol Utilities for Service SAFs
Memory Management
File I/O
Network I/O
Threads
Utilities
Virtual Server
Required Behavior of SAFs for Each Directive
Init SAFs
AuthTrans SAFs
NameTrans SAFs
PathCheck SAFs
ObjectType SAFs
Input SAFs
Output SAFs
Service SAFs
Error SAFs
AddLog SAFs
CGI to NSAPI Conversion
Chapter 4 Creating Custom Filters
Future Compatibility Issues
The NSAPI Filter Interface
Filter Methods
C Prototypes for Filter Methods
insert
See Also
remove
See Also
flush
See Also
read
See Also
write
See Also
writev
See Also
sendfile
See Also
Position of Filters in the Filter Stack
Filters that Alter Content-Length
Creating and Using Custom Filters
To create a custom filter
Write the Source Code
Compile and Link
Load and Initialize the Filter
Instruct the Server to Insert the Filter
Restart the Server
Test the Filter
Overview of NSAPI Functions for Filter Development
Chapter 5 Examples of Custom SAFs and Filters
Examples in the Build
AuthTrans Example
Installing the Example
Source Code
NameTrans Example
Installing the Example
Source Code
PathCheck Example
Installing the Example
Source Code
ObjectType Example
Installing the Example
Source Code
Output Example
Installing the Example
Source Code
Service Example
Installing the Example
Source Code
More Complex Service Example
AddLog Example
Installing the Example
Source Code
Quality of Service Example
Installing the Example
Source Code
Chapter 6 Creating Custom Server-parsed HTML Tags
Define the Functions that Implement the Tag
Write an Initialization Function
Load the New Tag into the Server
Chapter 7 NSAPI Function Reference
NSAPI Functions (in Alphabetical Order)
C
CALLOC
Syntax
Returns
Parameters
Example
See Also
cinfo_find
Syntax
Returns
Parameters
condvar_init
Syntax
Returns
Parameters
See Also
condvar_notify
Syntax
Returns
Parameters
See Also
condvar_terminate
Warning
Syntax
Returns
Parameters
See Also
condvar_wait
Syntax
Returns
Parameters
See Also
crit_enter
Syntax
Returns
Parameters
See Also
crit_exit
Syntax
Returns
Parameters
See Also
crit_init
Warning
Syntax
Returns
Parameters
See Also
crit_terminate
Syntax
Returns
Parameters
See Also
D
daemon_atrestart
Syntax
Returns
Parameters
Example
F
fc_open
Syntax
Returns
Parameters
fc_close
Syntax
Returns
Parameters
filebuf_buf2sd
Syntax
Returns
Parameters
Example
See Also
filebuf_close
Syntax
Returns
Parameters
Example
See Also
filebuf_getc
Syntax
Returns
Parameters
See Also
filebuf_open
Syntax
Returns
Parameters
Example
See Also
filebuf_open_nostat
Syntax
Returns
Parameters
Example
See Also
filter_create
Syntax
Returns
Parameters
Example
filter_find
Syntax
Returns
Parameters
filter_insert
Syntax
Returns
Parameters
filter_layer
Syntax
Returns
Parameters
filter_name
Syntax
Returns
Parameters
filter_remove
Syntax
Returns
Parameters
flush
Syntax
Returns
Parameters
Example
See Also
FREE
Syntax
Returns
Parameters
Example
See Also
func_exec
Syntax
Returns
Parameters
See Also
func_find
Syntax
Returns
Parameters
Example
See Also
func_insert
Syntax
Returns
Parameters
Example
See Also
I
insert
Syntax
Returns
Parameters
Example
L
log_error
Syntax
Returns
Parameters
Example
See Also
M
MALLOC
Syntax
Returns
Parameters
Example
See Also
N
net_flush
Syntax
Returns
Parameters
Example
See Also
net_ip2host
Syntax
Returns
Parameters
net_read
Syntax
Returns
Parameters
See Also
net_sendfile
Syntax
Returns
Parameters
Example
See Also
net_write
Syntax
Returns
Parameters
Example
See Also
netbuf_buf2sd
Syntax
Returns
Parameters
See Also
netbuf_close
Syntax
Returns
Parameters
See Also
netbuf_getbytes
Syntax
Returns
Parameters
Example
See Also
netbuf_getc
Syntax
Returns
Parameters
See Also
netbuf_grab
Syntax
Returns
Parameters
See Also
netbuf_open
Syntax
Returns
Parameters
See Also
nsapi_module_init
Syntax
Returns
Parameters
NSAPI_RUNTIME_VERSION
Syntax
Example
See Also
NSAPI_VERSION
Syntax
Example
See Also
P
param_create
Syntax
Returns
Parameters
Example
See Also
param_free
Syntax
Returns
Parameters
Example
See Also
pblock_copy
Syntax
Returns
Parameters
See Also
pblock_create
Syntax
Returns
Parameters
See Also
pblock_dup
Syntax
Returns
Parameters
See Also
pblock_find
Syntax
Returns
Parameters
See Also
pblock_findval
Syntax
Returns
Parameters
Example
See Also
pblock_free
Syntax
Returns
Parameters
See Also
pblock_nninsert
Syntax
Returns
Parameters
See Also
pblock_nvinsert
Syntax
Returns
Parameters
Example
See Also
pblock_pb2env
Syntax
Returns
Parameters
See Also
pblock_pblock2str
Syntax
Returns
Parameters
See Also
pblock_pinsert
Syntax
Returns
Parameters
See Also
pblock_remove
Syntax
Returns
Parameters
See Also
pblock_str2pblock
Syntax
Returns
Parameters
See Also
PERM_CALLOC
Syntax
Returns
Parameters
Example
See Also
PERM_FREE
Syntax
Returns
Parameters
Example
See Also
PERM_MALLOC
Syntax
Returns
Parameters
Example
See Also
PERM_REALLOC
Warning
Syntax
Returns
Parameters
Example
See Also
PERM_STRDUP
Syntax
Returns
Parameters
See Also
prepare_nsapi_thread
Syntax
Returns
Parameters
See Also
protocol_dump822
Syntax
Returns
Parameters
See Also
protocol_set_finfo
Syntax
Returns
Parameters
See Also
protocol_start_response
Syntax
Returns
Parameters
Example
See Also
protocol_status
Syntax
Returns
Parameters
Example
See Also
protocol_uri2url
Syntax
Returns
Parameters
See Also
protocol_uri2url_dynamic
Syntax
Returns
Parameters
See Also
R
read
Syntax
Returns
Parameters
Example
See Also
REALLOC
Warning
Syntax
Returns
Parameters
Example
See Also
remove
Syntax
Returns
Parameters
See Also
request_get_vs
Syntax
Returns
Parameters
See Also
request_header
Syntax
Returns
Parameters
See Also
request_stat_path
Syntax
Returns
Parameters
Example
See Also
request_translate_uri
Syntax
Returns
Parameters
See Also
S
sendfile
Syntax
Returns
Parameters
Example
See Also
session_dns
Syntax
Returns
Parameters
session_maxdns
Syntax
Returns
Parameters
shexp_casecmp
Syntax
Returns
Parameters
See Also
shexp_cmp
Syntax
Returns
Parameters
Example
See Also
shexp_match
Syntax
Returns
Parameters
See Also
shexp_valid
Syntax
Returns
Parameters
See Also
STRDUP
Syntax
Returns
Parameters
Example
See Also
system_errmsg
Syntax
Returns
Parameters
See Also
system_fclose
Syntax
Returns
Parameters
Example
See Also
system_flock
Syntax
Returns
Parameters
See Also
system_fopenRO
Syntax
Returns
Parameters
See Also
system_fopenRW
Syntax
Returns
Parameters
Example
See Also
system_fopenWA
Syntax
Returns
Parameters
See Also
system_fread
Syntax
Returns
Parameters
See Also
system_fwrite
Syntax
Returns
Parameters
See Also
system_fwrite_atomic
Syntax
Returns
Parameters
Example
See Also
system_gmtime
Syntax
Returns
Parameters
Example
See Also
system_localtime
Syntax
Returns
Parameters
See Also
system_lseek
Syntax
Returns
Parameters
See Also
system_rename
Syntax
Returns
Parameters
system_ulock
Syntax
Returns
Parameters
See Also
system_unix2local
Syntax
Returns
Parameters
See Also
systhread_attach
Syntax
Returns
Parameters
See Also
systhread_current
Syntax
Returns
Parameters
See Also
systhread_getdata
Syntax
Returns
Parameters
See Also
systhread_newkey
Syntax
Returns
Parameters
See Also
systhread_setdata
Syntax
Returns
Parameters
See Also
systhread_sleep
Syntax
Returns
Parameters
See Also
systhread_start
Syntax
Returns
Parameters
See Also
systhread_timerset
Syntax
Returns
Parameters
See Also
U
USE_NSAPI_VERSION
Syntax
Example
See Also
util_can_exec
UNIX Only
Syntax
Returns
Parameters
See Also
util_chdir2path
Syntax
Returns
Parameters
util_cookie_find
Syntax
Returns
Parameters
util_env_find
Syntax
Returns
Parameters
See Also
util_env_free
Syntax
Returns
Parameters
See Also
util_env_replace
Syntax
Returns
Parameters
See Also
util_env_str
Syntax
Returns
Parameters
See Also
util_getline
Syntax
Returns
Parameters
See Also
util_hostname
Syntax
Returns
Parameters
util_is_mozilla
Syntax
Returns
Parameters
See Also
util_is_url
Syntax
Returns
Parameters
See Also
util_itoa
Syntax
Returns
Parameters
util_later_than
Syntax
Returns
Parameters
See Also
util_sh_escape
Syntax
Returns
Parameters
See Also
util_snprintf
Syntax
Returns
Parameters
See Also
util_sprintf
Syntax
Returns
Parameters
Example
See Also
util_strcasecmp
Syntax
Returns
Parameters
See Also
util_strftime
Syntax
Returns
Parameters
See Also
util_strncasecmp
Syntax
Returns
Parameters
See Also
util_uri_escape
Syntax
Returns
Parameters
See Also
util_uri_is_evil
Syntax
Returns
Parameters
See Also
util_uri_parse
Syntax
Returns
Parameters
See Also
util_uri_unescape
Syntax
Returns
Parameters
See Also
util_vsnprintf
Syntax
Returns
Parameters
See Also
util_vsprintf
Syntax
Returns
Parameters
See Also
V
vs_alloc_slot
Syntax
Returns
See Also
vs_get_data
Syntax
Returns
Parameters
See Also
vs_get_default_httpd_object
Syntax
Returns
Parameters
See Also
vs_get_doc_root
Syntax
Returns
Parameters
vs_get_httpd_objset
Syntax
Returns
Parameters
See Also
vs_get_id
Syntax
Returns
Parameters
See Also
vs_get_mime_type
Syntax
Returns
Parameters
vs_lookup_config_var
Syntax
Returns
Parameters
vs_register_cb
Syntax
Returns
Parameters
vs_set_data
Syntax
Returns
Parameters
See Also
vs_translate_uri
Syntax
Returns
Parameters
W
write
Syntax
Returns
Parameters
Example
writev
Syntax
Returns
Parameters
Example
See Also
Chapter 8 Data Structure Reference
Privatization of Some Data Structures
Session
pblock
pb_entry
pb_param
Session->client
Request
stat
shmem_s
cinfo
sendfiledata
Filter
FilterContext
FilterLayer
FilterMethods
Chapter 9 Using Wildcard Patterns
Wildcard Patterns
Wildcard Examples
Chapter 10 Time Formats
Time and Date Strings
Chapter 11 Dynamic Results Caching Functions
dr_cache_destroy
Syntax
Parameters
Returns
Example
dr_cache_init
Syntax
Returns
Parameters
Example
dr_cache_refresh
Syntax
Returns
Parameters
Example
dr_net_write
Syntax
Returns
Parameters
Flags
Example
fc_net_write
Syntax
Returns
Parameters
Flags
Example
Chapter 12 Hypertext Transfer Protocol
Compliance
Requests
Request Method, URI, and Protocol Version
Request Headers
Request Data
Responses
HTTP Protocol Version, Status Code, and Reason Phrase
Response Headers
Response Data
Buffered Streams
Appendix A Alphabetical List of NSAPI Functions and Macros
© 2010, Oracle Corporation and/or its affiliates