Re: awake and sleep method invoking question
Re: awake and sleep method invoking question
- Subject: Re: awake and sleep method invoking question
- From: Art Isbell <email@hidden>
- Date: Sat, 29 Mar 2003 09:37:10 -1000
On Friday, March 28, 2003, at 12:53 PM, Kieran Kelleher wrote:
When I cause trigger the request-response cycle, the awake and sleep
methods
always get invoked TWICE, whereas in the book, the "you should see
output
like this" shows the awake and sleep methods getting invoked only once.
Any idea why I am getting awake and sleep invoked TWICE instead of
ONCE for
each request-response cycle?
If you're using an early version of Safari, you might be experiencing
the favicon bug that affects only Direct Connect mode (the mode that
PBX uses and which doesn't use a Web server). Someone posted the
following override method that works for me and that should be
implemented in your WOApplication subclass:
public WOResponse dispatchRequest(WORequest aRequest) {
// In Direct Connect mode, each favicon request will generate a
new
// session. This should workaround this problem.
if (isDirectConnectEnabled() && (aRequest != null) &&
aRequest.uri().equals("/favicon.ico")) {
return new WOResponse();
}
else {
return super.dispatchRequest(aRequest);
}
}
Browsers that support favicons normally send a request for them once
for each URL host, but the Safari bug occurs because early Safari
versions request the favicon on each request. When a Web server is
involved, this favicon request is handled by the Web server so the WO
app never sees the request. But in Direct Connect mode, the WO app
sees all requests.
Aloha,
Art
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.