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 $(NEXT_ROOT)/NextLibrary/WOApps.

    If you're installing a framework, type $(NEXT_ROOT)/NextLibrary/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/NextLibrary/WOApps/MyApp.woa
		MyApp[.exe]
		Resources/
		WebServerResources/
	<DocRoot>/WebObjects/MyApp.woa
		WebServerResources/
When the WebObjects adaptor first receives an HTTP request, the adaptor looks for an executable in <DocRoot>/WebObjects and NeXT_ROOT/NextLibrary/WOApps. Thus, you can install the entire directory under <DocRoot>/WebObjects, but doing so presents a security problem if you have scripted components. Any client can access any file under the document root, which means that if you install scripted components under the document root, you are exposing source code to outside users.

Instead, it is recommended that you install most of the application in NeXT_ROOT/NextLibrary/WOApps and install only the web server resources under the document root. It is also recommended that you install the application directly in the <DocRoot>/WebObjects directory rather than in a subdirectory. If you install in a subdirectory, your application can still run but cannot find image files unless you provide the application path on the command line. For more information, see Serving WebObjects.