The standard WebObjects Adaptor in your Web server's cgi-bin directory is a CGI executable that handles requests for WebObjects applications.
If you're using WebObjects Pro, and if your system hosts Netscapes Commerce Server, you can install WebObjects' Netscape Interface (NSAPI) Adaptor in place of the standard WebObjects Adaptor. The WebObjects NSAPI Adaptor is designed to be integrated with the Netscape Commerce Server according to the Netscape API, and thus eliminates the overhead of calling a separate CGI process.
The advantages of WebObjects NSAPI Adaptor are that it has no extra CGI processes between the server and the Web Application, and as a consequence, improved robustness and security (if your server machine has been misconfigured).
The disadvantage is that the WebObjects Netscape Interface Adaptor is harder to put into place (especially on NT).
The WebObjects NSAPI Adaptor works with the Netscape Commerce Server 1.1 with WebObjects version Beta1 and greater on
- Windows NT 3.51 and greater
- Solaris 2.3 and greater
WebObjects NSAPI Adaptor is named WONetscapeServerAdaptor.so on Solaris platforms. <>
Once installed, the WebObjects NSAPI Adaptor's behaviour will be completely transparent to you. URLs are not affected. Always use .../cgi-bin/WebObjects... in your URL, even though the request is not going through any CGI program. The string "/cgi-bin/WebObjects" is used as a key by the Netscape Commerce Server to use the linked-in Netscape Interface Adaptor.
Note: The Netscape Commerce Server will work with both kinds of Adaptors: the standard CGI WebObjects Adaptor or the linked-in WebObjects NSAPI Adaptor.
Note: If you want to use the WebObjects.conf file with the Netscape Interface Adaptor, then locate WebObjects.conf in your ns-home/http[d/s-port]/config/ directory rather than in your cgi-bin directory as for the standard WebObjects Adaptor.
You need to modify the following files in the Netscape Commerce Server's ns-home/http[d/s-port]/config directory.
In the NT Server Help application, read the chapter Using the NT Registry before you begin setting up <NeXT_Root>/NextLibrary/WebObjects/NSAPI-bin/NetscapeServerAdaptor.dll.
The Netscape Commerce Server on Windows NT doesn't provide any utility program to edit their developer configuration registry. It is not possible to automate this procedure as some customizations are necessary to the installation. Therefore, the following instructions should only be attempted by a Netscape server administrator. Be sure to follow these instructions to the letter, as any error could hang your Netscape server.
Getting started with the Registry Editor
- To run the Registry Editor, choose File|Run and type REGEDT32.EXE (you can also type start REGEDT32 from a command window).
- The Registry contains information in a hierarchical structure similar to the organization of files and directories on your hard disk. The Netscape Server configuration information is in the HKEY_LOCAL_MACHINE folder under Software | Netscape.
- Choose httpd, https, or httpd-80 whichever you want to configure, then choose CurrentVersion.
Adding a new object
- At this stage, you should see two folders Objects and Startup. Select Objects to add a new object to the list.
- Choose Edit|Add Key and type Object12 in the Key Name field. Select the new object created, choose the Edit|Add value. Type name in the Value Name field, validate it, and type webobjects in the string field. Your new object Object12 should now look like name : REG_SZ : webobjects, similar to the other objects listed, except it won't show a + sign in its folder, for the moment.
- Select your new object, Object12, choose Edit|Add Key and type Directive10 in the Key Name field. Select the new directive created and choose Edit|Add Value. Type DirectiveName in the Value Name field, validate it, and type Service in the string field.
- Select your new directive, Directive10, choose Edit|Add Key and type Function10 in the Key Name field. Select the new function created and choose Edit|Add Value. Type fn in the Value Name field, validate it, and type WONetscapeInterface in the string field. This completely specifies the webobjects object.
Modifying the default object
- In Object10, select Directive10, and choose Edit|Add Key. Type Function109 in the Key Name field. Select the new function created and choose Edit|Add Value. Type fn in the Value Name field, validate it, and type WONetscapeInterfaceFindWebObjects in the string field. Choose Edit|Add Value and type from in the Value Name field, validate it, and type /cgi-bin/WebObjects in the string field. Choose Edit|Add Value and type name in the Value Name field, validate it and type webobjects in the string field. You should now have a set of parameters like the following
fn : REG_SZ : WONetscapeInterfaceFindWebObjects
from : REG_SZ : /cgi-bin/WebObjects
name : REG_SZ : webobjects
Important: The registry name Function109 is not the important thing here: your new function must be the one immediately before the function defined by the following parameters
dir : REG_SZ : c:/NETSCAPE/cgi-bin
fn : REG_SZ : pfx2dir
from : REG_SZ : /cgi-bin
name : REG_SZ : cgi
This example assumed an uncustomized Netscape server, you had to insert your new function between Function10 and Function11, which meant you add to pick the name Function109. The instructions may not apply if you have a different Netscape server configuration.
Modifying the startup config
- Now select the StartUp registry which is at the same level as the Objects registry you have been working on for the moment.
- Choose Edit|Add Key and type InitFunction11 in the Key Name field. Select the new function created, choose Edit|Add Value, and type fn in the Value Name field, validate it, and type load-modules in the string field. Choose Edit|Add Value and type shlib in the Value Name field, validate it, and in the string field enter the path on your machine to the NetscapeServerAdaptor.dll file (for example, C:/<:NeXT_Root>/NextLibrary/WebObjects/NSAPI-bin/NetscapeServerAdaptor.dll.
- Choose Edit|Add Key and type InitFunction11 in the Key Name field. Select the new function created, choose Edit|Add Value, and type funcs in the Value Name field, validate it and type WONetscapeInterface,WONetscapeInterfaceFindWebObjects in the string field. You should now have a set of parameters like this:
fn : REG_SZ : load-modules
shlib : REG_SZ :
C:/NeXT/NextLibrary/WebObjects/NSAPI-bin/NetscapeServerAdaptor.dll
funcs : REG_SZ : WONetscapeInterface,WONetscapeInterfaceFindWebObjects
Important: The registry name InitFunction11 is not the important thing here, but your new function must be located between the init function(s) with (fn : REG_SZ : load-types) and the init function(s) with (fn : REG_SZ : init-clf). The order among the init functions with fn : REG_SZ : load-modules, if there are others than the one you just created, is irrelevant.
In this example, which assumes an uncustomized Netscape server, you had to insert your new function between Function1 and Function2, which meant you had to pick the name Function11. The exact name may vary if your Netscape server is differently configured.
- Restart your server