Table of Contents Previous Section

Request Level

The request-response cycle has three phases, the first for transferring user-entered data to the objects associated with the request page, the second for invoking an action method, and the third for generating and returning the response. Figure 16 shows how WebObjects requests are handled at the transaction level.

Figure 16. Request-Response Loop: Transaction Level

Three classes are involved at this level:

You rarely need to work directly with WORequest, WOResponse, and WOContext yourself. At the beginning of the request-response loop, the WOAdaptor and WOApplication objects create instances of these three classes. The application initiates each phase of the request-response loop by sending the messages takeValuesFromRequest:inContext:, invokeActionForRequest:inContext:, and appendToResponse:inContext: (in Java, takeValuesFromRequest, invokeAction, and appendToResponse). It passes in the WORequest, WOResponse, and WOContext objects as arguments to one or more of these methods. From these objects, the components, dynamic elements, and other objects involved in the cycle get essential information. See "How WebObjects Works-A Class Perspective" for more on the mechanics of request handling.

Table of Contents Next Section