The reason I asked the https question before is that some servlet
containers will not allow you to access a session object that was
created during a secure http request from a non secure http request (I
know tomcat 4 has this feature, jetty 5 does not, and the servlet spec
seems to agree with tomcat). So if createVisit was called from a https
url, then later accessed via http tomcat would return null, just fyi.

Mark; I would suggest download a firefox plugin called 'Live http
headers' (or use another solution that allows you to view all http
traffic to and from the server. Capture the traffic for the case where
the visit becomes null and where the visit does not become null then
compare the headers that were sent. My thought is that your container
sets the session cookie from one domain and somehow you end up
accessing the site from a slightly different domain causing the
session cookie not to be sent by the browser.

ryan


On 12/13/05, Mark Borins <[EMAIL PROTECTED]> wrote:
> >Frank Russo <frank.russo <at> FXALL.com> writes:
> >
> > It may also be the case when the session times out...
> >
> > Frank Russo
> > Senior Developer
> > FX Alliance, LLC
> >
> > > -----Original Message-----
> > > From: root [mailto:root <at> scazdl.org]
> > > Sent: Monday, December 12, 2005 7:32 PM
> > > To: Tapestry users
> > > Subject: Re: Visit becomes unexpectedly NULL
> > >
> > >
> > > "getVisit" call... where? In what object? (Page? Engine?).
> > > I'm going to assume that it's a page's "getVisit" call.  I
> > > use 3.0.3 and jvm 1.4.2 (both for test and development) and
> > > don't have any issues with the visit being null, generally.
> > > The only times I've personally seen it are when there's some
> > > sort of session id loss that occurrs (for example: if your
> > > browser is eating the session cookie, and you have
> > > urlrewriting disabled or something odd like that).  I'd check
> > > to see if there are any configuration difference production
> > > vs. development, both wrt to tapestry and wrt to what you're
> > > using to test tapestry first.  Then check your code. :)
> > >
> > > Robert
>
> First to address the problem of the production vs development environment.
> They are both actually behaving the same.
>
> For some unexplained reason when accessing the site locally everything works
> fine.  When I access the page across the internet then I run into this session
> problem.
>
> I am not using https.
>
> The session is certainly not timing out because I can get this error within 10
> seconds of logging in and creating a new session.
>
> So to resummarize my problem into something concise:
>
> I have a login page.
> I have a main page with a form, some direct links, and dynamic content based 
> on
> the visit object.
>
> The login page has a form that takes the username and password.  Checks that 
> the
> combination exists in the DB and then creates a Visit object by calling
> getVisit() from the page's java class.  Then it creates a User domain object 
> and
> stores it in the Visit (both Visit and User are serializable and have ids).
>
> Once the user logs in they are taken to the main page.  This main page 
> displays
> some content based on the visit object.  I have pageBeginRender and EndRender
> listeners that check to see if the Visit is null.
>
> I submit a form and the Begin and End render methods report that Visit is
> allright.
>
> Then the page reloads and it goes through the page Validation.  At this point
> the Visit is NULL.
>
> So somehow between endRender and pageValidate the Visit (or session) is being
> lost.
>
> I am stumped.
>
> Help is very much appreciated!
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to