Table of Contents Previous Section

The main method

The Application.java file that WebObjects Builder creates contains the application's main method:

import next.util.*;
import next.wo.*;

public class Application extends WebApplication {
    public static void main (String args[]) {
			ProcessInfo.setCommandLineArguments(args);
			Application application = new Application();
			application.run();
    }
}
The Application class is declared to be a subclass of WebApplication. The main method instantiates the Application object and starts the request-response loop. Before doing so, it sends the application's NSProcessInfo object the command-line arguments so that WebObjects can properly initialize its defaults. (The command-line arguments contain the document root and the name of the WebObjects application under the document root.)

Table of Contents Next Section