Sun Java System Web Server 6.1 SP7 NSAPI Programmer's Guide

Installing the Example

To load the shared object containing your functions, add the following line in the Init section of the magnus.conf file:

Init fn=load-modules shlib=yourlibrary funcs=simple-service-init,simple-service

To call the function, simple-service-init function for initializing the message representing the generated output, add the following line to the Init section in magnus.conf. (This line must come after the one that loads the library containing simple-service-init.)

Init fn=simple-service-init
 generated-output="<H1>Generated output msg</H1>"

To execute the custom SAF during the request-response process for some object, add the following line to that object in the obj.conf file:

Service type="text/html" fn=simple-service

The type="text/html" argument indicates that this function is invoked during the Service stage only if the content-type has been set to text/html.