Complete Contents
About This Guide
Chapter 1 Introduction to iPlanet Web Server
Chapter 2 Administrating iPlanet Web Servers
Chapter 3 Setting Administration Preferences
Chapter 4 Managing Users and Groups
Chapter 5 Working with Server Security
Chapter 6 Managing Server Clusters
Chapter 7 Configuring Server Preferences
Chapter 8 Understanding Log Files
Chapter 9 Using SNMP to Monitor Servers
Chapter 10 Configuring the Server for Performance
Chapter 11 Extending Your Server with Programs
Chapter 12 Working with Configuration Styles
Chapter 13 Managing Server Content
Chapter 14 Controlling Access to Your Server
Chapter 15 Configuring Web Publishing
Chapter 16 Using Search
Appendix A HyperText Transfer Protocol
Appendix B ACL File Syntax
Appendix C Internationalized iPlanet Web Server
Appendix D Server Extensions for Microsoft FrontPage
Appendix E iPlanet Web Server User Interface
Glossary
Index
Previous Next Contents Index Bookshelf


Chapter 11 Extending Your Server With Programs

This chapter discusses how to install programs on the iPlanet Web Server that dynamically generate HTML pages in response to requests from clients. These programs are known as server-side applications. (Client-side applications, which are downloaded to the client, run on the client machine.)

This chapter includes the following sections:


Overview of Server-Side Programs
Java servlets, JavaScript applications, and CGI programs have different strengths and uses. The following list illustrates the differences between these server-side programs:

Warning. Note. iPlanet Web Server 4.1 does not support server-side Java applets.

Types of Server-Side Applications That Run on the Server
The iPlanet Web Server can run the following types of server-side applications to dynamically generate content:

The iPlanet Web Server can also run programs that extend or modify the behavior of the server itself. These programs, known as plug-ins, are written using the Netscape Server Application Programming Interface (NSAPI). For information about writing and installing plug-in programs, see the NSAPI Programmer's Guide for iPlanet Web Server.

How Server-Side Applications Are Installed on the Server
Each type of program is installed onto the server differently. The following list summarizes the procedures:

These installation procedures are described in the following sections.


Java Servlets and JavaServer Pages (JSP)
This section discusses how to install and use Java Servlets and JavaServer Pages on iPlanet Web Server.

This section describes the following topics:

Overview of Servlets and JavaServer Pages
iPlanet Web Server supports Java servlets and JavaServer Pages (JSP).

Java servlets are server-side Java programs that can be used to extend the functionality of a web server in much the same way as CGI programs do. Servlets can be thought of as applets that run on the server side without an interface. Servlets are invoked through URL invocation. iPlanet Web Server includes support for JavaSoft's Servlet API at the level of the Java Servlet Development Kit (JSDK) 2.2.1PR.

To develop servlets, use Sun Microsystems' Java Servlet API. For information about using the Java Servlet API, see the documentation provided by Sun Microsystems at:

For information about developing servlets for use with iPlanet Web Server, see Programmer's Guide to Servlets in iPlanet Web Server.

A JavaServer Page (JSP) is a page, much like an HTML page, that can be viewed in a web browser. However, as well as containing HTML tags, it can include a set of JSP tags that extend the ability of the web page designer to incorporate dynamic content in a page. These tags provide functionality such as displaying property values and using simple conditionals. iPlanet Web Server supports JavaServer Pages (JSP) to the level of JSP API 1.0 compliance.

For information about creating JavaServer Pages, see Sun Microsystem's JavaServer Pages web page at:

What the Server Needs to Run Servlets and JSPs
iPlanet Web Server includes the Java Runtime Environment (JRE) but not the Java Development Kit (JDK). The server can run servlets using the JRE, but it needs the JDK to run JSP. If you want to run JSP, you must tell iPlanet Web Server to use a custom JDK.

iPlanet Web Server 4.1 requires you to use official versions of JDK, with different platforms requiring different versions, as summarized in Table 11.1.

Table 11.1 JRE/JDK Versions by Platform
Platform
JRE/JDK Version
Solaris Sparc
1.2.2_01
Windows NT
1.2.2_01
HPUX
1.2.2_02
AIX
1.2.1
DEC
1.2.1-2
Linux
1.2.2RC3+
IRIX
1.2.1

Check the iPlanet Web Server Installation and Migration Guide and the latest Release Notes for updates on required JDK versions.

JDK 1.2 (and other JDK versions) are available from Sun Microsystems at:

You can specify the path to the JDK in either of the following ways:

Whether you specify the path to the JDK during installation or later, the path is the folder in which you installed the JDK.

Enabling Servlets and JSP
Before iPlanet Web Server can run servlets, the servlet engine must be enabled. Before the server can serve JSP, the servlet engine must be enabled and JSP must be enabled. (The server cannot serve JSP if servlets are not enabled.)

To enable and disable servlets and JSP in iPlanet Web Server, use the Enable/Disable Servlets/JSP page in the Servlets tab in the Server Manager. This page lets you enable or disable servlets and also enable or disable JSP. If servlets are disabled, you cannot enable JSP.

If servlets are enabled, JSP can be enabled or disabled. However, if you disable servlets, JSP is automatically also disabled. In this case, if you enable servlets later, you must re-enable JSP also if desired.

You can also define a thread pool to be used for servlets. For any server subsystem you can specify which thread pool the servlet's going to run on. For more information about thread pools, see Adding and Using Thread Pools.

Making JSPs Available to Clients
You can install JSP files simply by putting them in any directory in or under the document root—you do not need to do anything special to install JSP files—so long as the following conditions are true:

Making Servlets Available to Clients
For servlets, you have a choice of two ways to make a servlet accessible to clients:

You can choose both these options. You can specify a servlet directory and define servlet virtual path translations for servlets outside the servlet directory.

Specifying Servlet Directories
One of the ways to make a servlet accessible to clients is to put it into a directory that has been registered with iPlanet Web Server as a servlet directory. Servlets in registered servlet directories are dynamically loaded when needed. The server monitors the servlet files and automatically reloads them on the fly as they change.

For example, if the SimpleServlet.class servlet is in the servlet subdirectory of the server's document root directory, you can invoke the servlet by pointing the web browser to:

You can register any number of servlet directories for iPlanet Web Server. Initially, the web server has a single servlet directory per server instance, which is server_id/docs/servlet/.

iPlanet Web Server expects all files in a registered servlet directory to be servlets. Any files, including applets, in that directory that have the .class extension will be treated as servlets. iPlanet Web Server does not correctly serve other files, such as HTML files or JSPs, that reside in that directory.

The server can have multiple servlet directories, all of which must reside below the primary document directory in the directory hierarchy. You can map servlet directories to virtual directories if desired. For example, you could specify that http://my_domain.com/products/ invokes servlets in the directory server_id/docs/servlet/january/products/servlets/.

To register servlet directories and to specify their URL prefixes (virtual or not), use the Servlet Directory page in the Servlets tab of the Server Manager. Set the following fields:

URL Prefix. The prefix for accessing the directory. For example, if you want the logical URL http://servername/plans to translate to the directory d:/netscape/server4/docs/plans then enter plans in the URL Prefix field.

Servlet Directory. The absolute pathname to the directory to be registered as a servlet directory, for example, d:/netscape/server4/docs/plans. iPlanet Web Server treats all files in the directory as servlets.

Note. By default, URLs that are redirected are always escaped. To prevent this, add escape="no". For example:

Configuring Global Attributes
You can set some global attributes for servlets, including:

To set the global attributes, use the "Configure Global Servlet Attributes" page in the Servlets tab of the Server Manager. Set the following fields:

Startup Servlets.. In this field, enter the name of servlets to be loaded when the web server starts up. You do not need to include the .class extension.

Session Manager.. If you have a session manager class, enter its value here.

Session Manager Args.. If you want to specify session manager arguments, enter the values here. Separate multiple name=value parameters with a comma. Input must be in the format name=value,name2=value2, and so on. For more information, see Appendix A, "Session Managers," in Programmer's Guide to Servlets for iPlanet Web Server.

Reload Interval.. This is the interval in seconds the server waits before reloading servlets and JavaServer Pages if they have changed. Specify an integer value here between 0 and 600 inclusive. The default value is 5 seconds.

Configuring Servlet Attributes
If you want to specify input parameters, class paths, or virtual translations for a servlet, you need to individually configure the servlet. Do this in the Configure Servlet Attributes page of the Servlets tag in the Server Manager.

Note. When you configure a servlet through the Configure Servlet Attributes page, the servlet is automatically added to the servlets.properties file in iPlanet Web Server's config directory.

In this page, you can specify the following fields:

Choose Servlet. Specifies the servlet to edit. If no virtual paths have previously been set up, the list is empty. Upon choosing the servlet from this drop-down list, the servlet's information is displayed in the page. (Ignore this field if you are adding a new virtual path entry).

Servlet Name. Specifies an identifier for the servlet. This identifier is used internally by iPlanet Web Server; it is not used in the URL for accessing the servlet. This identifier can be the same name or a different name than the servlet class name.

Servlet Code (class name). Specifies the name of the servlet's main class file. The .class extension is optional. Do not specify any directories in this field.

Servlet Classpath. This is the absolute pathname or URL to the directory or zip/jar file containing the servlet. The classpath can point anywhere in the file system. The servlet classpath may contain a directory, a .jar or .zip file, or a URL to a directory.(You cannot specify a URL as a classpath for a zip or jar file.) If the servlet classpath is not a registered servlet directory, you must additionally provide a servlet virtual path translation for it (as discussed in "Configuring Servlet Virtual Path Translations") to make the servlet accessible to clients.

iPlanet Web Server supports the specification of multiple directories, jars, zips, and URLs in the servlet classpath.

Servlet Args. If the servlet takes additional parameters, enter them here. Separate multiple name=value parameters with a comma. Input must be in the format name=value,name2=value2.... For example, arg1=45, arg2=online, arg3="quick shopping".

Configuring Servlet Virtual Path Translations
One way to make servlets available to clients is to put them in registered servlet directories. Another way is to define servlet virtual path translations for individual servlets. For example, you could specify that the URL:

invokes the servlet defined in

You can set up servlet virtual path translations for servlets that reside anywhere, on a local or remote file system, or in or out of a registered servlet directory.

Before setting up a servlet virtual path translation, the servlet must have been configured in the Configure Servlet Attributes page of the Servlets tab in the Server Manager, as discussed in "Configuring Servlet Attributes."

To specify a servlet virtual translation path, use the Configure Servlet Virtual Path Translation page in the Servlets tab in the Server Manager. This page has the following fields:

Choose Virtual Path Entry. Specifies a virtual path to modify. If no virtual paths have previously been set up, the list is empty. Upon choosing the virtual path from this drop-down list, the information for the virtual path is displayed in the page. Ignore this field if you are adding a new virtual path entry.

Virtual Path. If you are adding a new path, enter it here. (It's OK to overwrite existing virtual path names.) If you are modifying a path, select the appropriate path from the Choose Virtual Path Entry list to make the path name show up in this field.

The value to enter here is the URL for the virtual path without the
http://servername part. For example, if you want the virtual path to be http://servername/virtual/tracker, enter /virtual/tracker.

Servlet Name. Specifies an identifier for the servlet, as entered in the Configure Servlet Attributes page. It's OK if the servlet identifier has not been specified already, but it must be specified before the virtual path will work.

Configuring JRE/JDK Paths
When you install iPlanet Web Server, you can choose to install the Java Runtime Environment (JRE) or you can specify a path to the Java Development Kit (JDK).

The server can run servlets using the JRE, but it needs the JDK to run JSP. The JDK is not bundled with iPlanet Web Server, but you can download it for free from Sun Microsystems at:

Regardless of whether you choose to install the JRE or specify a path to the JDK during installation, you can tell the iPlanet Web Server to switch to using either the JRE or JDK at any time. Switch to the Web Server Administration Server, select the Global Settings tab, and use the Configure JRE/JDK Paths page. You can also change the path to the JDK in this page.

Supply values for the following fields if you select the JDK radio button:

JDK Path. Enter the path for the JDK. This is the directory where you installed the JDK.

JDK Runtime Libpath. Enter the runtime library path for the JDK.

JDK Runtime Classpath. The class path includes the paths to the directories and jar files needed to run the servlet engine, the servlet examples, and any other paths needed by servlets that you add. Values are separated by semicolons. You can add new values to the existing class path, but don't delete the existing value since it includes paths that are essential for servlet operation.

Supply values for the following fields if you select the JRE radio button:

JRE Path. Enter the path for the JRE. This is the directory where you installed the JRE.

JRE Runtime Libpath. Enter the runtime library path for the JRE.

Note. If you are not sure of the JDK runtime libpath, the JDK runtime classpath, or the JRE runtime libpath, leave these fields blank to tell the server to use default paths.

Configuring JVM Attributes
You can configure attributes for the Java Virtual Machine (JVM) in the Configure JVM page of the Servlets tab in the Server Manager.

For more information on these options, see Programmer's Guide to iPlanet Web Server.

Deleting Version Files
The server uses two directories to cache information for JavaServer Pages (JSP) and servlets:

Each cache has a version file containing a version number that the server uses to determine the structure of the directories and files in the caches. You can clean out the caches by simply deleting the version file.

When the server starts up, if it does not find the version files, it deletes the directory structure for the corresponding caches and re-creates the version files. Next time the server serves a JSP page, it recreates the JSP class cache. The next time the server serves a JSP page or servlet while using MMappedSessionManager session manager, it recreates the session data cache.

If a future upgrade of the server uses a different format for the caches, the server will check the number in the version file and clean up the caches if the version number is not correct.

The Delete Version Files page allows you to delete the files that contain the version number for the JavaServer Pages class cache and the session data cache. This page has the following fields:

Delete the SessionData Version File . Deletes the version file for the session data. When you apply this change, the version file is deleted immediately. The next time the server starts up, it deletes the session data cache and recreates the version file. The next time the server serves a JSP page or servlet while using the MMappedSessionManager session manager, it recreates the session data cache.

Delete the ClassCache Version File . Deletes the class cache version file for JSP pages. When you apply this change, the version file is deleted immediately. The next time the server starts up, it deletes the JSP class cache and recreates the version file. The next time the server serves a JSP page, it recreates the class cache.


Installing CGI Programs
This section discusses how to install CGI programs. It has the following sub-sections:

In addition, the following sections discuss how to install Windows NT-specific CGI programs:

Overview of CGI
Common Gateway Interface (CGI) programs can be defined with any number of programming languages. On a Unix/Linux machine, you're likely to find CGI programs written as Bourne shell or Perl scripts.

Note
Under Unix/Linux, there are extra CGIStub processes running that the server uses to aid in CGI execution. These processes are created only during the first access to a CGI. Their number varies depending upon the CGI load on the server. Do not kill these CGIStub processes. They disappear when the server is stopped.

For more information see the discussion regarding MinCGIStub, MaxCGIStub, and CGIStubIdleTimeout in CGIStub Processes (Unix/Linux).

On a Windows NT computer, you might find CGI programs written in C++ or batch files. For Windows NT, CGI programs written in a Windows-based programming language such as Visual Basic use a different mechanism to operate with the server. They are called Windows NT CGI programs. See "Installing Windows NT CGI Programs" for information about Windows NT CGI.

Note. In order to run the command-line utilities, you need to manually set the Path variable to include server_root/bin/https/bin.

Regardless of the programming language, all CGI programs accept and return data in the same manner. For information about writing CGI programs, see the following sources of information:

There are two ways to store CGI programs on your server machine:

You can enable both options at the same time if desired.

There are benefits to either implementation. If you want to allow only a specific set of users to add CGI programs, keep the CGI programs in specified directories and restrict access to those directories. If you want to allow anyone who can add HTML files to be able to add CGI programs, use the file type alternative. Users can keep their CGI files in the same directories as their HTML files.

If you choose the directory option, your server attempts to interpret any file in that directory as a CGI program. By the same token, if you choose the file type option, your server attempts to process any files with the file extensions .cgi, .exe, or .bat as CGI programs. If a file has one of these extensions but is not a CGI program, an error occurs when a user attempts to access it.

Warning. Note that you must enable cookies in your browser to run CGI programs.

Note. By default, the file extensions for CGI programs are .cgi, .exe and .bat. However, you can change which extensions indicate CGI programs by modifying the MIME types file. You can do this by choosing the Server Preferences tab and clicking the MIME Types link.

Specifying a CGI Directory
To specify a CGI-only directory, perform the following steps:

  1. From the Server Manager, choose the Programs tab.
  2. Click the CGI Directory link.
  3. In the URL Prefix field, type the URL prefix to use for this directory. That is, the text you type appears as the directory for the CGI programs in URLs.
Note.
Installing Windows NT CGI Programs
This section discusses how to install Windows NT CGI Programs. The following topics are included in this section:

Overview of Windows NT CGI Programs
Windows NT CGI programs are handled much as other CGI programs. You specify a directory that contains only Windows NT CGI programs, or you specify that all Windows NT CGI programs have the same file extension. Note that like other CGI programs, you can use both methods at the same time if you want to. For example, you can create a directory for all your Windows NT CGI programs, and specify a Windows NT CGI file extension.

Although Windows NT CGI programs behave like regular CGI programs, your server processes the actual programs slightly differently. Therefore, you need to specify different directories for Windows NT CGI programs. If you enable the Windows NT CGI file type, it uses the file extension .wcg.

iPlanet Web Servers support the Windows NT CGI 1.3a informal specification, with the following differences:

Specifying a Windows NT CGI Directory
To specify a Windows NT CGI-only directory:

  1. From the Server Manager, choose the Programs tab.
  2. Click the Win CGI Directory link.
  3. In the URL Prefix text field, enter the URL prefix you want to use for this directory.
Note.
Installing Shell CGI Programs for Windows NT
This section discusses how to install Shell CGI Programs for Windows NT. The following topics are included in this section:

Overview of Shell CGI Programs for Windows NT
Shell CGI is a server configuration that lets you run CGI applications using the file associations set in Windows NT.


For example, if the server gets a request for a shell CGI file called hello.pl, the server uses the Windows NT file associations to run the file using the program associated with the .pl extension. If the .pl extension is associated with the program C:\bin\perl.exe, the server attempts to execute the hello.pl file as follows:

The easiest way to configure shell CGI is to create a directory in your server's document root that contains only shell CGI files. However, you can also configure the server to associate specific file extensions with shell CGI by editing MIME types from the iPlanet Web Server.

Note. For information on setting Windows NT file extensions, see your Windows NT documentation.

Specifying a Shell CGI Directory (Windows NT)
To create a directory for your shell CGI files, perform the following steps:

  1. Create the shell directory on your computer. This directory doesn't have to be a subdirectory of your document root directory.
  2. From the Server Manager, choose the Programs tab.
  3. Click the Shell CGI Directory link.
  4. In the URL Prefix field, enter the URL prefix you want to associate with your shell CGI directory.

  • In the Shell CGI Directory field, enter the absolute path to the directory you created.
  • Make sure that any files in the shell CGI directory also have file associations set in Windows NT. The server returns an error if it attempts to run a file that has no file-extension association.
  • Specifying Shell CGI as a File Type (Windows NT)
    You can use the iPlanet Web Server's MIME Types window to associate a file extension with the shell CGI feature. This is different from creating an association in Windows NT.

    To associate a file extension with the shell CGI feature in the server, for example, you can create an association for files with the .pl extension. When the server gets a request for a file with that extension, the server knows to treat the file as a shell CGI file by calling the executable associated in Windows NT with that file extension.

    To associate a file extension as a shell CGI file, perform the following steps:

    1. Create the shell directory on your computer. This directory doesn't have to be a subdirectory of your document root directory.
    2. From the Server Manager, choose Server Preferences.
    3. Click the MIME Types link.
    4. Add a new MIME type with these settings:
    5. Click the New Type button.
    6. Save and apply your changes.

    Using the Query Handler
    Note. The use of Query Handlers is outdated. Although iPlanet Web Server and Netscape Navigator clients still support it, it is rarely used. It is much more common for people to use forms in their HTML pages to submit queries.

    You can specify a default query handler CGI program. A query handler processes text sent to it via the ISINDEX tag in an HTML file.

    ISINDEX is similar to a form text field in that it creates a text field in the HTML page that can accept typed input. Unlike the information in a form text field, however, the information in the ISINDEX box is immediately submitted when the user presses Return. When you specify your default query handler, you tell your server to which program to direct the input. For an in-depth discussion of the ISINDEX tag, see an HTML reference manual.

    To set a query handler, perform the following steps:

    1. From the Server Manager, choose the Programs tab.
    2. Click the Query Handler link.
    3. Use the Resource Picker to select the resource you want to set a default query handler for.
    4. In the Default Query Handler field, enter the full path for the CGI program you want to use as the default for the resource you chose.
    5. Click OK.
    6. Save and apply your changes.

    Server-Side JavaScript Programs
    To allow iPlanet Web Server to run Server-Side JavaScript programs, you need to enable Server-Side JavaScript, which you can do in the Activate Server Side JavaScript page in the Programs tab of the Server Manager.

    To install and manage Server-Side JavaScript programs on the server, use the JavaScript Application Manager.

    The following topics are included in this section:

    For more information about writing JavaScript applications, see Writing Server-Side JavaScript Applications at:

    Activating Server-Side JavaScript
    To enable Server-Side JavaScript on iPlanet Web Server, perform the following steps:

    1. From the Server Manager, choose the Programs tab.
    2. Click the Server Side Javascript link.
    3. Under Activate the Server Side Javascript application environment, click the Yes radio button.
    4. If you want to require the administration server username and password before allowing access to the Application Manager, select the second Yes radio button.
    5. Click OK.
    6. Save and apply your changes.
    Running the Application Manager
    For applications written in Server-Side JavaScript, you can perform many administrative tasks with the Server-Side JavaScript Application Manager. Using the Application Manager, you can do the following:

    To run the Application Manager, perform the following steps:

    1. From the Server Manager, choose the Programs tab.
    2. Click the Server Side Javascript link.
    3. Click the link to the Application Manager.
    4. Click OK.
    5. Select an application by clicking its name in the scrolling list.
    6. Click the task buttons in the left frame to perform the indicated action on the selected application.
    7. Click the Add Application tab at the top to add a new JavaScript application.
    8. Click the Preferences tab at the top to configure the default settings to use when adding a new application.
    Securing the Application Manager
    The Application Manager runs on iPlanet Web Server. It is installed into the js/appmgr directory. It can be accessed with the URL:

    Consequently, you may want to restrict access to the Application Manager URL and the application URI so that only you and any other trusted administrators can access them. If you don't restrict access to the Application Manager, anyone can add, remove, modify, start, and stop applications on your server.


    If you want to require the administration server username and password for access to the Application Manager, perform the following steps:

    1. From the Server Manager, choose the Programs tab.
    2. Click the Server Side Javascript link.
    3. Under "Require administration server password for Server Side Javascript Application Manager" click the Yes radio button.
    4. Click OK.
    5. Save and apply your changes.
    If your server does not use the Secure Sockets Layer (SSL), the username and password for the Application Manager are transmitted unencrypted over the network. Any intruder who intercepts this data may be able to access the Application Manager. If you use the same password for your administration server, the intruder can also control your server. For security reasons, do not use the Application Manager from outside your firewall unless you are using SSL.

    Installing Server-Side JavaScript Applications
    You can install up to 120 JavaScript applications on one server.

    You must install (add) an application with the Application Manager before you can run it.

    To install a new application, perform the following steps:

    1. From the Server Manager, choose the Programs tab.
    2. Click the Server Side Javascript link.
    3. Click the link to the Application Manager.
    4. Click the Add Application tab at the top of the page.
    5. In the Name field, type the name of the JavaScript application.
    6. In the Web File Path field, type the absolute path to the .web file for the application.
    7. In the Default Page field, note what file to send to a client who does not indicate a specific page for the application.
    8. In the Initial Page field, specify a page to run when the application is first started.
    9. In the External Libraries field, specify the absolute paths of any libraries to be used with the application.
    10. In the Client Object Maintenance field, specify the mode for maintaining the client object. For additional information on client objects, refer to Writing Server-Side JavaScript Applications at:
    11. After you have entered all the required information, click OK to install the application, Reset to clear all the fields, or Cancel to cancel the operation.
    Note. Don't give any JavaScript applications the same names as any subdirectories of your primary document directory. If you do, the server will no longer correctly process requests for resources in the directory. For example, if you have a directory server_root/docs/bug, and a JavaScript application named bug, all requests for any files in the bug directory (or any of its subdirectories) will attempt to launch the JavaScript application bug. The JavaScript application URI takes precedence.

    Application URLs
    When you install a Server-Side JavaScript application, you must enter a name for it. This name determines the application URL, the URL that clients use to access a JavaScript application. Application URLs are of the form

    where server is the name of the HTTP server, domain is the Internet domain (including any subdomains), port is the port number of the HTTP server, appName is the application name you enter when you install it, and page is the name of a page in the application, such as the default page name.

    You can also access the application with the URL

    since the server knows the default page to open.

    For example, if your server is named myserver and your domain name is mozilla.com, the application name is world, and the default page is hello.html, you can access the application with either of the following URLs:

    or

    When a client requests an application URL, the server runs the Server-Side JavaScript code inside the default page then sends the resultant HTML page to the client.

    Important
    Before you install an application, make sure the application name you choose does not usurp an existing URL on your server. All client requests for URLs that match the application URL are routed to the directory specified for the .web file, circumventing the server's normal document root.

    Using the previous example, any requests for URLs that begin with
    http://myserver.mozilla.com/world will look for documents in the js/samples/world directory and not in your server's normal document root.

    Controlling Access to a Server-Side JavaScript Application
    When you install an application, you may want to restrict its use to only certain users. You can do this by applying a configuration style to the application. For more information, see Working With Configuration Styles For more information on restricting access to part of your server, see Controlling Access to Your Server

    Modifying Installation Parameters
    To modify an application's installation parameters, open the Application Manager as described in the section "Running the Application Manager." Then select the application name in the left frame of the Application Manager and click Modify.

    You can change any of the parameters defined when you installed the application except the application name. To change the name of an application, you must remove the application and then reinstall it.

    If you modify the parameters of a stopped application, the Application Manager automatically starts it. When you modify parameters of an active application, Application Manager automatically stops and restarts it.

    Removing a Server-Side JavaScript Application
    To remove the selected application, open the Application Manager as described in "Running the Application Manager," then click Remove. This action removes the application from the Application Manager but does not delete files from the server. At this point, clients can no longer access the application.

    If you delete an application and you subsequently want to run it, you must install it again.

    Starting, Stopping, and Restarting a Server-Side JavaScript Application
    To start an installed application that is stopped, open the Application Manager as described in "Running the Application Manager," and then click Start. If the application starts successfully, clients can invoke the application.

    To stop an active application, click Stop. The application's status changes to "stopped," and clients can no longer invoke the application. You must stop an application if you want to move the .web file or update an application from a development server to a deployment server.

    To restart a running application, click Restart. Before any changes take effect, you must restart an application after you compile it.

    You can also start, stop, and restart an application by entering a special URL of the form:

    where appName is the application name and action is either stop, start, or restart.

    Running a Server-Side JavaScript Application
    There are two ways to run an installed application:

    If you attempt to run a stopped application (one that is not active), then the Application Manager tries to start it first.

    Configuring Default Settings
    To configure default settings for new applications, open the Application Manager as described in "Running the Application Manager," and then click the Preferences tab. When you install a new application, the default installation parameters are used for the initial settings.

    You can specify the following default settings:


    Enabling WAI Services
    Note. Web Application Interface (WAI) is provided in iPlanet Web Server 4.x, but is not guaranteed to be supported in future releases. We recommend that you do not develop new WAI applications.

    WAI services are a kind of plug-in that uses the Common Object Request Broker Architecture (CORBA). WAI applications can be written in C, C++, or Java, and they interact with iPlanet Web Server over Internet Inter-ORB Protocol (IIOP). A WAI application runs within its own process. WAI applications need an object request broker (ORB) to work.

    iPlanet Web Server 4.x does not ship with an object request broker (ORB). Before using WAI applications, you must install Visibroker 3.3+ from Inprise. You can get Visibroker3.3+ from the Inprise web site at:

    After installing Visibroker 3.3+, you will need to install WAI on your iPlanet Web Server. You can do this by running through the installation process, and choosing to install only WAI.

    After you have installed WAI, the next step is to enable it on your server. Enabling WAI services essentially turns on Internet Inter-ORB Protocol (IIOP) support in the server.

    To enable WAI services on your server, perform the following steps:

    1. From the Server Manager, choose the Programs tab.
    2. Click the WAI Handler link.
    3. To enable WAI services, click the Yes radio button.
    4. Save and apply your changes.
    For more information about WAI, see Writing Web Applications with WAI at:

     

    © Copyright © 2000 Sun Microsystems, Inc. Some preexisting portions Copyright © 2000 Netscape Communications Corp. All rights reserved.