PATH  WebObjects 4.0 Documentation > What's New in WebObjects 4.0

Table of Contents Previous Section

Command-Line Options

WebObjects 4.0 uses the Foundation NSUserDefaults object to specify application command-line options. As a consequence, all options have been renamed. The following table lists the WebObjects 3.5 options with their new names.
Old Option New Option Description
-debug
ON|OFF
-WODebuggingEnabled
YES|NO
Sets whether the application prints messages to standard error during startup. By default, this option is enabled. WOApplication, WOComponent, and WOSession define a new debugWithFormat: method (debugString in Java). This method is similar to logWithFormat: except that it only prints messages if the WODebuggingEnabled option is on
-browser
ON|OFF
-WOAutoOpenInBrowser
YES|NO
Sets whether the application automatically opens a web browser window to the application's URL (starting up the browser if necessary). By default, this option is enabled.
-m
ON|OFF
-WOMonitorEnabled
YES|NO
Enables or disables monitoring. By default, this option is disabled. If this option is enabled and you manually start an application, the application tries to find a running Monitor.
-mhost
hostName | subnet
-WOMonitorHost
hostName | subnet
If the WOMonitorEnabled option is on and you use this option, the application tries to find a running Monitor on the machine named hostName instead of on the local machine. If subnet is used, the application looks for a running Monitor in its network subnet.
-c -WOCachingEnabled
YES|NO
Requests that the application cache component definitions (templates) instead of reparsing HTML and declaration files upon each new HTTP request. By default, this option is disabled.
-d documentRoot None You are no longer required to specify the document root.
-a adaptorClass -WOAdaptor adaptorClass The WOAdaptor class name. The default is now WOMultiThreadedAdaptor. See the section Support for Multithreaded Applications for more information on WOMultiThreadedAdaptor.
-i instanceNumber None You are no longer required to specify instance numbers when load-balancing applications. The instance number is now private to the configuration file.
-p portNumber -WOPort portNumber The socket port used to connect to an application instance. Unlike previous versions of WebObjects, this option is independent of the adaptor option. A portNumber of -1 means use an arbitrary high port number; however, you cannot specify -1 as the value on the command line; to set the value to -1, you must use the defaults command.
-q listenQueueSize -WOListenQueueSize listenQueueSize The depth of the listen queue. The default has changed from 4 to 5.
None -WOWorkerThreadCount int Maximum number of worker threads for a multithreaded application. The default worker thread count is 8. Setting this count to 0 results in single-threaded (WebObjects 3.5-style) request dispatch.
None -WOOtherAdaptors plist Use this option to attach additional adaptors (other than the one specified by -WOAdaptor) to the application. The plist option is an array of dictionaries written in property list format.
None -WOCGIAdaptorURL
path
The absolute URL that points to the WebObjects CGI adaptor.
None -WOApplicationBaseURL The path from the web server's document root to the directory where your application (or project, if in rapid turnaround mode) resides. The default is "/WebObjects", but you may place your application anywhere under the document root. See Rapid Turnaround Mode for more a complete discussion of this option.
None -WOFrameworksBaseURL The location of frameworks under your document root if you're using a web server. The default is /WebObjects/Frameworks (as it was in release 3.5). All frameworks that your application uses must be in this directory.
None -NSProjectSearchPath
pList
An array of paths in which your project directories are located. (The array is written in property list format.) The default is a single item: ".." If you specify this option, WebObjects looks in the locations you specify for a project that has the same name as the application or framework being loaded. If it finds a project, it uses the images, scripted components, and other resources from the project directory instead of from the application or framework's main bundle. This way, you can modify images and scripted components in your project and test them without having to rebuild the application.
None -WOIncludeComments
InResponses YES|NO
Sets whether the HTML parser includes comments from the components' HTML files in the responses. The default is YES. See Troubleshooting WebObjects 4.0 Template Parsing for more information.
None -WOSessionTimeOut timeout Sets the timeout interval for sessions. By default, they now time out after 3600 seconds (in prior releases of WebObjects, sessions never timed out by default).

As with all user defaults, you can set them three ways: on the application's command line, using the defaults utility, or programmatically.

Be careful when setting options programmatically. Most options require knowledge of the environment in which the application runs, and the appropriate values change if you move the application to a different machine. For example, you should never set the WOPort option programmatically.

Table of Contents Next Section