Request level – Apple WebObjects 3.5 User Manual

Page 68

Advertising
background image

Chapter 5

WebObjects Viewed Through Its Classes

68

When a user makes an initial request to a WebObjects application, the
application creates a session object (WOSession). At the end of the request-
response cycle, the application stores the state-bearing session object using the
facilities of WOSessionStore. With each subsequent cycle of the request-
response loop for that user, the application restores the state of the session at the
beginning of the cycle and stores it again at the end of the cycle. To learn more
about how to use WOSessionStore, see the chapter “Managing State”
(page 109).

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:

WORequest (in Java, Request)

Stores essential data about an HTTP request, such as header information,
form values, HTTP version, host and page name, and session, context, and
sender IDs.

adaptor

Request

Response

transaction 1

transaction 2

session 1

session 1

HTTP server

application

session store

Advertising