Return-Path: Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 4578 invoked from network); 6 Dec 2000 19:38:45 -0000 Received: from mail4.registeredsite.com (HELO localhost.localdomain) (root@209.35.159.16) by locus.apache.org with SMTP; 6 Dec 2000 19:38:45 -0000 Received: from mail.fitzpatrick.cc (mail.fitzpatrick.cc [216.247.102.238]) by localhost.localdomain (8.9.3/8.9.3) with ESMTP id OAA11213 for ; Wed, 6 Dec 2000 14:33:10 -0500 Received: from cartman [24.13.242.72] by mail.fitzpatrick.cc (SMTPD32-6.00) id A5A64DF4009E; Wed, 06 Dec 2000 14:38:14 -0500 From: "CPC Livelink Admin" To: Subject: RE: scope of a bean Date: Wed, 6 Dec 2000 14:40:26 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal In-Reply-To: <3A2E8A9B.20C5A942@mindspring.com> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N If you use response.sendRedirect then you are telling the browser (ie client) to open the supplied URL. The browser then makes a new request for that URL. So, if your bean is scoped to a request, then it will be out of scope for the redirect. If it is scoped for the session or application, then it will still be there. On the other hand, if you do a forward operation (pageContext.forward) or an include, then tomcat handles it all internally, and so it is all one 'request', so a bean scoped as request will be seen by all the pages included or forwarded to. Does this clear it up? Regards, Paul -----Original Message----- From: Peter Choe [mailto:choepete@mindspring.com] Sent: Wednesday, December 06, 2000 01:51 PM To: tomcat-user@jakarta.apache.org Subject: Re: scope of a bean so... if i use a redirect like an action in a form, it creates a new bean? CPC Livelink Admin wrote: > > Also, are you using a forward or redirect? A redirect makes a new request > from the browser, a forward does it all internally (ie same request). > > -----Original Message----- > From: Edson Carlos Ericksson Richter > [mailto:Edson.Richter@anvisa.gov.br] > Sent: Wednesday, December 06, 2000 12:48 PM > To: tomcat-user@jakarta.apache.org > Subject: RES: scope of a bean > > Hi! > > Is not your bean in different contexts? I`ve this problem in the past, when > I used two contexts (and, of course, one JSP page in each context). > > Edson Richter > > > ----- Mensagem original ----- > > De: Peter Choe [SMTP:choepete@mindspring.com] > > Enviada em: quarta-feira, 6 de dezembro de 2000 12:53 > > Para: tomcat-user@jakarta.apache.org > > Assunto: scope of a bean > > > > i am trying to write an jsp where a bean is instaniated and has it data > > initialized on one jsp page. and then another page should be able to > > read the data from the bean. i have set the scope of the bean to > > request, but when it goes to the other page, i noticed that it is > > creating a new bean rather using the bean that was instaniated from the > > previous page. > > > > am i misunderstanding the scope of the bean? how can i get bean to be > > recognized by two jsp files without using session scope? > > > > peter choe