Web Development


Appendix A . Web Application Utility

This chapter describes the command-line utility that can help you develop and manage a Panther Web application. The utility description is organized into the following components, as applicable:

To get a command-line description of a utility's available arguments and command options, type the utility's name with the -h switch. For example:

monitor -h

monitor

Administers Web applications

monitor -option [appName...]

option
Specifies the task to perform with one of these constants:

-clean appName ...
Deletes expired cache files. This option is also automatically performed by the dispatcher while the application is running.

-configure appName ...
Directs the dispatcher to reread its configuration file and reset its behavior and the behavior of its jservers, if necessary.

-findsvc serviceName
For Windows, finds matching entries for the specified service name.

-install appName [-display displayName]
[-description
service-description]
[-{automatic|manual|disabled}]
[-user {
domain\user|.\user}]
[-password
password] [[-depend serviceName] ... ]
For Windows, installs the application as a service using the display name (if specified), service description (if specified), the user and password, and starting any services specified as dependent first. The automatic/manual/disabled option corresponds to the settings in the Services section of the Control Panel. The Control Panel can also be used to add installation options when they are not specified with this command.

-log appName ...
Starts the event log request.

-list
Lists the applications that are currently running.

-listsvc
For Windows, lists all service names and service display names.

-remove appName
For Windows, removes the application as a service.

-restart appName
Runs the three following monitor options: -clean, -stop, -start. On Windows, if the Web application has been registered as a service, this option is obsolete.

-start appName ...
Starts the named application if it is not already running. On Windows, if the Web application has been registered as a service, this option is obsolete. In this case, use the Services section of the Control Panel or type net start appName to start the application.

-status appName ...
Produces the same output as the -log option but sends it to standard output (or to another convenient platform-specific place) for immediate viewing.

-stop appName ...
Stops the application. This action causes a normal shutdown of dispatchers and jservers. On Windows, if the Web application has been registered as a service, this option is obsolete. In this case, use the Services section of the Control Panel or type net stop appName to stop the application.

appName
The name of the application's configuration file without its .ini extension. This argument is identical to the name of the application's requester. You can specify multiple applications with the same command. If you specify an application that is not running, the utility returns an error message.

Description

monitor is a command-line utility–monitor on UNIX, monitor.exe on Windows–which lets you administer a running web application. Each invocation can perform a single task on one or more applications. You can use monitor to start and stop a web application server; you can also perform these maintenance tasks:

Installing an Application as a Windows Service

For Windows Web servers, you can install the Web application as a service using the -install option. You can also specify the display name and description for the Services window and the dependent services that must be started before this service. For dependent services, the service name, not the display name, must be specified. If more than one dependent service needs to be specified, the -depend keyword must be specified before each service. If the name of the associated service contains a space, that service should be surrounded in double quotes.

Use the monitor -listsvc or monitor -findsvc options to find the service name.

Once the application is installed as a service, you must start the application with the net start command, in the Services dialog box in the Control Panel, or by having the machine automatically start the application when it reboots. The monitor -start command must not be used.

For example, if the application is named storeinven and needs database services named DBProcess 1 and DBCheck, the following command line installs the application as a service:

monitor -install storeinven -depend "DBProcess 1" -depend DBCheck

In addition, if the name of this application in the Services dialog box is Video Store Inventory, the command line changes to the following:

monitor -install storeinven -display "Video Store Inventory" -depend "DBProcess 1" -depend DBCheck

You must stop the application with the net stop command or in the Services dialog box.

Order of Services

It is also recommended that the services needed by the Panther web application start in a specific order:

Full Syntax

The full syntax of the command is:

monitor -start application-name [application-name ...]
monitor -stop application-name [application-name ...]
monitor -configure application-name [application-name ...]
monitor -log application-name [application-name ...]
monitor -clean application-name [application-name ...]
monitor -status [application-name ...]
monitor -list
monitor -install application-name
[-display display-name]
[-description service-description]
[-{automatic|manual|disabled}]
[-user {domain\user|.\user}]
[-password password]
[[-depend service-name]...]
monitor -remove application-name
monitor -restart application-name
monitor -listsvc
monitor -findsvc name

The -install; -remove; -listsvc and -findsvc options are only supported in Windows.