Table of Contents Previous Section
Setting the Default Request Handler
If a request URL doesn't have a request handler key (as is the case with the initial URL used to begin a session with a WebObjects application), WOApplication uses whatever its default request handler is set to be. By default, the default request handler is WOComponentRequestHandler. If you want to write an application entirely using direct actions, set the default request handler in your WOApplication's init method or constructor in this way:
// Java implementation
public WOApplication() {
super();
...
setDefaultRequestHandler(requestHandlerForKey(
WOApplication.directActionRequestHandlerKey()));
...
} //WebScript implementation
- init {
self = [super init];
...
[self setDefaultRequestHandler:[self requestHandlerForKey:
[WOApplication directActionRequestHandlerKey]]];
...
return self;
}
Table of Contents Next Section