|
Answer
|
The problem is usually to be found in incorrect HTML or JavaScript. This results in the browser making another request of the app, a request that does not include a session so a new one is created.
There are two good ways to track this down. Using them both at the same time is usually the most effective approach.
1) Add this to your Session.java constructor:
NSLog.out.appendln(new RuntimeException("Session Created at:"));
This will provide a stack trace to where each new session was created.
2) Override dispatchRequest in Application to be something like this:
public WOResponse dispatchRequest(WORequest request)
{
NSLog.debug.appendln("Dispatching URI " + request.uri());
return super.dispatchRequest(request);
}
This should allow you to see the URI that is creating the extra session. You will then need to trace this back to your HTML/JavaScript.
|