Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 43331 invoked from network); 9 Oct 2003 15:06:54 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 9 Oct 2003 15:06:54 -0000 Received: (qmail 41053 invoked by uid 500); 9 Oct 2003 15:06:22 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 41015 invoked by uid 500); 9 Oct 2003 15:06:21 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 40990 invoked from network); 9 Oct 2003 15:06:21 -0000 Received: from unknown (HELO pandc2501.panamericano.com.br) (200.230.150.66) by daedalus.apache.org with SMTP; 9 Oct 2003 15:06:21 -0000 Received: by pandc2501.panamericano.com.br with Internet Mail Service (5.5.2653.19) id ; Thu, 9 Oct 2003 12:07:05 -0300 Message-ID: <4EFE7B26CE175F4B9653BD51D199CCFC0154DE61@PANMS2505A> From: Edson Alves Pereira To: 'Tomcat Users List' Subject: RE: String added to session in servlet not available in jsp Date: Thu, 9 Oct 2003 12:07:01 -0300 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C38E76.FDCA6210" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C38E76.FDCA6210 Content-Type: text/plain When i need to get session variables or objects i use Taglibs, its do a good job. > ---------- > De: rudidoku@xs4all.nl[SMTP:rudidoku@xs4all.nl] > Responder: Tomcat Users List > Enviada: quinta-feira, 9 de outubro de 2003 12:01 > Para: Tomcat Users List > Assunto: RE: String added to session in servlet not available in jsp > > Yoav, > > Very good point. The sessionid from the servlet is different to the one in > the browser, as shown below. > > Ser: 1DFADA80613F3BE01C86A5C6DE2501A8 > jsp: AEAE6C4879702A3CF4254FF85B778D81 > > Rudi > > > > Howdy, > > If you display the session ID before adding the user name, and then in > > your JSP as you already do, are they the same session? > > > > Yoav Shapira > > Millennium ChemInformatics > > > > > >>-----Original Message----- > >>From: rudidoku@xs4all.nl [mailto:rudidoku@xs4all.nl] > >>Sent: Thursday, October 09, 2003 10:44 AM > >>To: tomcat-user@jakarta.apache.org > >>Subject: String added to session in servlet not available in jsp > >> > >>Hi, > >> > >>I created a session object and added a string (username) to it. > >>Systemout.println shows the username from the request. My page is then > >>forwarded to another as follows: > >> > >> RequestDispatcher disp = ctx.getRequestDispatcher(target); > >> disp.forward(request, response); > >> > >>On this jsp page, I have teh following code: > >> > >> String usr = (String)session.getAttribute("usr"); > >> out.println("User: " + usr + "!"); > >> out.println("Session Id: " + session.getId()); > >> > >>The page displays the session Id but not the usr. > >> > >>I'm quite baffled at why this is the case. > >> > >>looking in google for similar problems, but any help would be much > >>appreciated! > >> > >>Rudi > >> > >>--------------------------------------------------------------------- > >>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > >>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > > > > > > > > > > This e-mail, including any attachments, is a confidential business > > communication, and may contain information that is confidential, > > proprietary and/or privileged. This e-mail is intended only for the > > individual(s) to whom it is addressed, and may not be saved, copied, > > printed, disclosed or used by anyone else. If you are not the(an) > > intended recipient, please immediately delete this e-mail from your > > computer system and notify the sender. Thank you. > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > ------_=_NextPart_001_01C38E76.FDCA6210--