Documentation Archive Developer
Search
Table of Contents Previous Section

The WebObjects Application Executable

When a WebObjects application receives a request from a WebObjects adaptor, it processes the request in three phases. As shown in Figure 6, the application uses the page-to-script mappings defined in the declarations files to:

The following sections describes what happens during each phase.

Take Values From Request

The application prepares for the request by updating variables in the request page-the page from which the request was made. That is, if a user has provided any input that maps to a component variable, the application assigns the new value to the variable. For example, when a user clicks Submit in the first page of the HelloWorld example application (in NextDeveloper/Examples/WebObjects/HelloWorld.woa), the application gets the value from the text field and assigns it to the visitorName variable defined in the Main component.

Invoke Action

After preparing for the request, the application determines whether or not the user has triggered an action. If an action has been triggered-for example, if the user clicked a button or a hyperlink-the application invokes the action method that corresponds to what the user did. For example, clicking Submit in HelloWorld has the effect of invoking the sayHello action method. An action method returns a component that represents the response page-the page that is sent back to the web server. sayHello returns a component that represents the Hello page. If the user does not trigger an action, the components for the request page also represents the response page.

Generate Response

The response page component generates the HTML for the response. Using the HTML template and declarations file, the component generates the HTML that is eventually displayed in the user's web browser. For example, after Submit is clicked in HelloWorld and sayHello returns the component for the Hello page, the Hello page component generates the resulting personalized greeting.

Table of Contents Next Section