Documentation Archive Developer
Search
PATH  Documentation > WebObjects 4.5 > WebObjects Developer's Guide


Table of Contents Previous Section

Installing Applications

When an application is ready to be deployed, do the following in Project Builder:

  1. Click the inspector button to open the Build Attributes Inspector. In the Install in field, type $(LOCAL_LIBRARY_DIR)/WebObjects/Applications.

    If you're installing a framework, type $(LOCAL_LIBRARY_DIR)/Frameworks.

  2. If your project contains web server resources, go to the Makefile.preamble file under Supporting Files. Uncomment the line that defines this macro:
    INSTALLDIR_WEBSERVER
    

  3. In the Project Build panel, click the checkmark button to bring up the Build Options panel.

  4. Choose "install" as the build target, and close the Build Options panel.

  5. Click the Build button to start the build and installation process.
Assuming that your application is named MyApp.woa, this procedure installs these directories:

NeXT_ROOT/Local/Library/WebObjects/MyApp.woa
MyApp[.exe]
Resources/
WebServerResources/
and (assuming that you have web server resources):

<DocRoot>/WebObjects/MyApp.woa
WebServerResources/
While you can install the entire directory under <DocRoot>/WebObjects, doing so presents a security problem if you have scripted components. Any client can access any file under the document root; if you've installed scripted components there, you are exposing source code to outside users. Instead, you should install most of your application in NeXT_ROOT/Local/Library/WebObjects/Applications and install only the web server resources under the document root.

If you install the application in a subdirectory of <DocRoot>/WebObjects, you should set the WOApplicationBaseURL user default to point to the exact location of the application directory. (As with all user defaults, you can set WOApplicationBaseURL on the command line when launching the application or you can use the defaults command.) For example:

defaults write MyApp WOApplicationBaseURL 
/WebObjects/MyWebApps
If you don't set WOApplicationBaseURL, your application can still run but cannot find image files and other web server resources. For more information, see Serving WebObjects.

Table of Contents Next Section