Re: Multiple unknown sessions created for one user
Re: Multiple unknown sessions created for one user
- Subject: Re: Multiple unknown sessions created for one user
- From: Chuck Hill <email@hidden>
- Date: Fri, 17 Nov 2006 15:16:57 -0800
Hi Carter,
On Nov 17, 2006, at 3:00 PM, Carter Wojcik wrote:
Hi All -
I recently put some debugging statements into my
session constructor and discovered that multiple
sessions were being created for a user as they
navigated through the app. I searched the project
code and the session constructor is not being called
directly in any of the code.
No, it is not. Grin.
I checked the number of sessions for the application
(application.activeSessionsCount()) in the session
constructor and sure enough each new page calls the
constructor and the number of sessions increases by
one. I did notice that the sessionid in the url does
not change and stays as the original session id as
each page is called.
Does anyone have any hints as to why the session
constructor is being called more than once?
Chuckle. Yeah. Been there, done that. You have some bad HTML or
JavaScript in there that is confusing the browser. Instead of doing
whatever you intended, the browser is sending it to the application
as a request. This comes in with no Session, so the app creates a
new one.
Add this to Application.java:
public WOResponse dispatchRequest(WORequest request)
{
WOResponse result;
NSLog.out.appendln("Dispatching " + request.uri());
result = super.dispatchRequest(request);
NSLog.out.appendln("Finished dispatching " + request.uri());
return result;
}
Match up the Dispatching ... line with the bad session creation and
then trace the URI back to some HTML or Java Script that your app is
sending out.
Chuck
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden