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: Carter Wojcik <email@hidden>
- Date: Mon, 20 Nov 2006 10:01:27 -0800 (PST)
Hi Chuck -
Thanks for the info. I added your code to
application.java and am able to narrow down the issue
to a woimage that I have on my pagewrapper. The image
is associated with the user once they login to the
application. If there is no image then I am getting
the following with your debug code:
12:06:15[INFO-][ NSLog]
Dispatching /ERROR/NOT_FOUND/DYNAMIC_DATA
...
... other debug code
...
12:06:16[INFO-][ NSLog]
Finished dispatching /ERROR/NOT_FOUND/DYNAMIC_DATA
Then the following in the html:
<img width="75" height="75"
src="/ERROR/NOT_FOUND/DYNAMIC_DATA">
Seems this can be rectified by placing a woconditional
around the woimage coming from the database and
another woconditional around a static image if there
is no image in the database.
Thanks again for helping.
Carter
--- Chuck Hill <email@hidden> wrote:
> 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
>
>
>
>
>
>
____________________________________________________________________________________
Sponsored Link
Compare mortgage rates for today.
Get up to 5 free quotes.
Www2.nextag.com
_______________________________________________
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