JavaServer

Adding Services


Contents / Administrator Docs / Developer Docs / Index

You can add additional services to a host with the aid of the addservice tool. Once the services are added, they can be managed using the Administration Tool just like the default services.

The addservice tool is run from the command line -- the ability to create new services is not yet available through the Admininistration GUI. In a future release, this ability will be fully integrated.

Adding Services to a Server

Adding services to a server is easy with the addservice tool. It gathers the necessary information through a series of prompts. It even double-checks with you, once it has all the necessary information, before proceeding with the creation of the service. If you change your mind about the information you've input or even about adding the service at all, the final prompt provides the opportunity to discard the request.

Here are the steps:

  1. Log in to your machine under the user name used to install the Java Web Server (typically this is root, but need not be).
  2. Make sure the Java Web Server is running.
  3. From the <server_root>/bin directory, or by specifying the full path name, invoke the tool by typing:
    addservice
    where <server_root> is the directory into which you installed the Java Web Server.
  4. When prompted, type in the username and password you use with the Web Server Administration Tool.
  5. From the list of servers found by the addservice utility, select the server to which you wish to add a service. The prompt gives the default [javawebserver]. Hit enter to accept the default or type in the name of another server.
  6. From the list of services recognized by the addservice utility, select the service you wish to add. The prompt gives the default [webpageservice]. Hit enter to accept the default or type in the name of another service.

    The choices are: webpageservice, secureservice, adminservice, or proxyservice.

  7. When prompted, type in a single word name for the service you are adding. For example, you may want to name a HTTP service internalHTTP.
  8. When asked, type in a description of the service you are adding. For instance, you may describe it as "HTTP service for internal users". Note that it is this descriptive text that will appear in the Administration Tool labelling the service.
  9. Once all the above information is collected by the tool, it's final step is to ask you to confirm that you really want to add the service. To proceed, type yes. To cancel, type no.
  10. Note:
    The permissions set on the directories created by the addservice tool will be based on your login at the time the tool is run. If you run the tool with a login name such as root, be sure the new directories have appropriate permissions for the user who will subsequently run the server. (By default, the server set-uid's to nobody when started as root). If the directories do not have the necessary permissions, correct them using the chmod command.

After the services have been created by the addservice Tool, the Administration Tool has to be refreshed to pick up the change. To do this,

  1. Log out out of the Administration Tool if you are currently running it, then log back in.
  2. Now select the server to which you added the service. Stop it using the GUI buttons, then restart it.
  3. You should now see the service labelled with the description you provided above.

Having added the service with the addservice tool, and refreshed the Administration Tool to pick up the change, you can now manage the service through the Administration GUI in the same manner as any of the default services.


Top
java-server-feedback@java.sun.com
Copyright © 1997 Sun Microsystems, Inc.
All Rights Reserved.