Return-Path: Delivered-To: apmail-xml-cocoon-users-archive@xml.apache.org Received: (qmail 96096 invoked by uid 500); 18 Oct 2001 14:20:57 -0000 Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-users@xml.apache.org Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 96072 invoked from network); 18 Oct 2001 14:20:57 -0000 X-MimeOLE: Produced By Microsoft Exchange V6.0.4712.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: session and xsl Date: Thu, 18 Oct 2001 10:18:55 -0400 Message-ID: <937B9574F4A2A344812CB180F5B5D25EB5CEB2@corpmail.eduprise.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: session and xsl Thread-Index: AcFWepv3aiWYRFu+RUK5hRD5/wd7gwBZTaxQ From: "Marty McClelland" To: X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I use C1.8.2 and have the following code to access the session: HttpSession theUserSession =3D request.getSession();=20 String theLoginName =3D (String) = theUserSession.getAttribute("loginName"); marty=20 > -----Original Message----- > From: Mark S. Kent [mailto:mark.kent@vistyx.com] > Sent: Tuesday, October 16, 2001 3:06 PM > To: cocoon-users@xml.apache.org > Subject: RE: session and xsl >=20 >=20 > This is what I have in C1 in my XSP code: >=20 > > EmployeeData employeeData =3D null; > try > { > employeeData =3D (EmployeeData)session.getAttribute( "employee" = ); > } > catch( ClassCastException e ) {} >=20 > Integer empID =3D null; > if( employeeData !=3D null ) > { > System.out.println( "Data ID: " +=20 > employeeData.getEmployee_id() ); > empID =3D employeeData.getEmployee_id(); > } > else > { > System.out.println( "Data ID: none" ); > empID =3D new Integer( -1 ); > } > >=20 > The line: >=20 > employeeData =3D (EmployeeData)session.getAttribute( "employee" = ); >=20 > is exactly how I do it in my JSP pages. When I test for "null" on the > employeeData object, however, it is always "null". It may be a C1 > limitation. We are looking at C2 because of the additional features. >=20 > Is there a "request" object for the session variable? =20 > Currently I retrieve > session variables as above and have only done "requests" for form/URL > variables. >=20 > Mark >=20 > -----Original Message----- > From: Christian Haul [mailto:haul@dvs1.informatik.tu-darmstadt.de] > Sent: Tuesday, October 16, 2001 1:35 PM > To: cocoon-users@xml.apache.org; Mark Kent > Subject: Re: session and xsl >=20 >=20 > On 16.Oct.2001 -- 09:14 AM, Mark S. Kent wrote: > > I also have an interest on retrieving session values in my=20 > XML file to > help > > build the XML data. I thought that XSP would be able to=20 > read them as my > JSP > > pages do since both run under Tomcat, but am having trouble=20 > seeing them > from > > the XML document. >=20 > Mark, accessing session attributes from XSP ist piece of cake :-) > There's a logicsheet aka taglib for it. Otherwise use the request > object and access the data through ordinary java. >=20 > > Chris, is the solution you mention below only available in C2? >=20 > Which one of the two alternatives? Honestly, I don't know about C1, > there might be a session taglib but passing parameters from a non > existant sitemap won't do :-) >=20 >=20 > > From: Christian Haul [mailto:haul@dvs1.informatik.tu-darmstadt.de] > > On 15.Oct.2001 -- 04:35 PM, Mohamed Ramzy wrote: > > > hi all, > > > i'm trying to read session variables through .xsl > > > file, if you have any idea how to do that, please tell > > > > No way. At least from a stylesheet. Pass parameters from sitemap > > instead. For a taglib, just use session taglib within your taglib. >=20 > Chris. >=20 > -- > C h r i s t i a n H a u l > haul@informatik.tu-darmstadt.de > fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 >=20 >=20 > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. >=20 > To unsubscribe, e-mail: > For additional commands, e-mail: >=20 >=20 --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: