so I take it that a redirect header doesn't count as a redirect? Have you worked without cookies? This is where it really has come up.
> -----Original Message----- > From: keithBacon [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, February 20, 2002 11:10 AM > To: Struts Users Mailing List > Subject: RE: sessions > > > I never had a problem with sessions or links. It's very > straightforward. > Struts deals with moving around inside 1 web-app using > Forwards not Redirects. > A session is always there for your jsp or Action class to use. > Struts handles the user denying cookies - it automatically > uses URL re-writing > to store the sessionID on the client. > Redirect is for going off to a different server or web-app > which don't know > anything about the session being left. If you want to pass > data to the new > location you have to park it somewhere else. > So not being a super expert - really all I can assure you is > it ought to be > very simple for normal requirements. > Hope that helps - Happy strutting - Keith. > > > --- Bill Page <[EMAIL PROTECTED]> wrote: > > thanks for the response. > > > > I couldn't find it in the archives either. I'm pretty new > to the server > > side java (been client side for the last 5 years), servlets > and all that so > > I may have some basic misunderstandings. It looks to me > like any anchors in > > the HTML result will need to have encodeURL or > encodeRedirectURL applied to > > them. Looking at the struts code the ActionServlet, it > looks like struts > > appends the session only if the redirect flag is on. I may also not > > understand the definition of URL rewriting here, but can not find a > > definition. > > > > If I'm always forwarding through struts using say success > and failure how > > would I know to do anything? As I see it the beauty of the > forwarding > > mechanism is that I don't have to know the destination in the action > > subclass. Yet if I'm understanding this, I'll lose the > session id. I seem > > to keep it if I always set the redirect flag in the forward > class, but I'm > > suspicious that that is not the correct way. > > > > To further complicate this, we're using a menu program to > generate the > > javascript for a horizontal menu at the top. Looks like > (and what I'm in > > the middle of doing now) I'll need to manually append > ";jsessionid=nnnn" in > > a javascript function and then do a "location=". As we're > both invoking jsp > > and "*.do" actions, I'm parsing to figure out whether to > append the session > > or not. > > > > If I'm going through a lot of work for something that > should be done another > > way, I'd love to know. > > > > > > > > > -----Original Message----- > > > From: Keith [mailto:[EMAIL PROTECTED]] > > > Sent: Wednesday, February 20, 2002 6:14 AM > > > To: Struts Users Mailing List > > > Subject: Re: sessions > > > > > > > > > Hi Bill, > > > This has been answered but I couldn't find the answer in > the archive! > > > I'm not the expert here but - it's when a new session is created. > > > Struts doesn't know if the browser accepts cookies (where the > > > session id is to > > > be stored) so puts it in the URL (URL re-writing). On the > > > next request struts > > > knows the cookie is accepted so doesn't need to put the > > > sessionId inthe URL. > > > So every time you see that it's the symptom of a new session > > > being created - no > > > the cause. > > > > > > > -- > > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > > > > ===== > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Search the archive:- > http://www.mail-archive.com/struts-user%40jakarta.apache.org/ > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Keith Bacon - Looking for struts work - South-East UK. > phone UK 07960 011275 > > __________________________________________________ > Do You Yahoo!? > Yahoo! Sports - Coverage of the 2002 Olympic Games > http://sports.yahoo.com > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>