Documentation Archive Developer
Search
PATH  Documentation > WebObjects 4.5 > WebObjects Developer's Guide


Table of Contents Previous Section

Application Awake

The application's awake method is invoked at the start of every cycle of the request-response loop. Therefore, in the awake method, you perform anything that should happen before each and every user request is processed. For example, if you wanted to keep track of the number of requests that an application receives, you could do that in the awake method:

// WebScript Application.wos 
- awake {
++requestCount;
[self logWithFormat:@"Now serving request %@", requestCount];
}
// Java Application.java
public void awake() {
++requestCount;
this.logString("Now serving request " + requestCount);
}

Table of Contents Next Section