WebObjects applications are event driven, but instead of responding to mouse and keyboard events, they respond to HTTP requests. A WebObjects application receives a request, responds to it, then waits for the next request. The application continues to respond to requests until it terminates. On each cycle of this request-response loop, the application stores user input, invokes an method if one is associated with the user's action, and generates a response---usually an HTML page.
Most of your program's activity is a reaction to messages the application sends out during a cycle of the request-response loop. These messages are hooks into the loop from which you can invoke your application's custom behavior. This chapter discusses the flow of control inside the request-response loop and the request-response loop hooks.
This section looks at handling requests in a typical application, beginning where the application itself begins, with the code that sets up the request-response loop.
This section describes the three phases of handling a request and the sequence of events that occur in each phase. The topics included are:
This section describes the two types of awake methods: an application awake method and a component awake method. Both provide an opportunity for the receiver to perform initialization before it participates in request handling. The biggest difference between the two is that an application awake method is only invoked once, whereas component awake methods can be invoked many times.
This section describes how to use action methods---methods that are associated with user actions.
This section describes the request and response handling methods---methods that are invoked at a specific point in the request-response loop. The topics included are: