Redirect causes a new request, not a new session.

A few other things to try:
 - Check that your server is actually sending a session cookie or rewriting
the URL
   (change your browser settings to see when the server sends you a cookie)
 - If your server supports it, try using an HttpSessionListener and
   HttpSessionAttributeListener to help debug when sessions are created and
   attributes added/removed
 - If you still can't see the problem, post the relevant code from your
action

Steve


> -----Original Message-----
> From: Nathan Coast [mailto:[EMAIL PROTECTED]
> Sent: August 14, 2003 7:53 PM
> To: Struts Users Mailing List
> Subject: Re: How to keep session info??
>
>
>  > Make sure that your <forward/> isn't doing a redirect (i.e.
>  > redirect="true").  If I understand things correctly, a redirect will
> cause a
>  > new session to be created...
>  >
>  > Jerry
>
> Are you sure?  I haven't looked at this area of the source for a while
> but I can't think any sensible reason why it would be desirable for a
> redirect to cause a new session.
>
> If the problem is that a variable is placed into the session and then is
> missing during the same request (and the forward is within the same
> web-app), it sounds to me like there might be some erroneous code
> somewhere.  I'd check for silly mistakes
>
> check you aren't putting null in the session,
> check you aren't setting the var in the request rather than the session,
> check the var in the session isn't null immediately after placing in the
> session,
> check the request isn't going via some code that calls
> session.invalidate(), or is removing the var from the session.
>
> hope this helps
>
> Jerry Jalenak wrote:
>
> >
> > -----Original Message-----
> > From: development [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, August 14, 2003 8:42 PM
> > To: [EMAIL PROTECTED]
> > Subject: How to keep session info??
> >
> >
> > Hi all,
> >
> > I've got a LoginAction which inside its execute method validates and
> > saves the login info into HttpSession instance. It creates an
> > ActionForward and returns it.
> > All works good and it calls the new Action which I call MembersAction
> > which tries to retrieve the login info.
> > Somehow though the session ID is different and so I lost all my login
> > info :(
> >
> > Can someone tell me why session would be diferent please?
> >
> > Cheers
> > Vic
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> > This transmission (and any information attached to it) may be
> confidential and is intended solely for the use of the individual
> or entity to which it is addressed. If you are not the intended
> recipient or the person responsible for delivering the
> transmission to the intended recipient, be advised that you have
> received this transmission in error and that any use,
> dissemination, forwarding, printing, or copying of this
> information is strictly prohibited. If you have received this
> transmission in error, please immediately notify LabOne at the
> following email address: [EMAIL PROTECTED]
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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]
>
>
>



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

Reply via email to