Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 16262 invoked from network); 23 Aug 2004 12:31:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 23 Aug 2004 12:31:58 -0000 Received: (qmail 12552 invoked by uid 500); 23 Aug 2004 12:31:44 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 12452 invoked by uid 500); 23 Aug 2004 12:31:43 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: users@cocoon.apache.org Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 12438 invoked by uid 99); 23 Aug 2004 12:31:43 -0000 X-ASF-Spam-Status: No, hits=4.1 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,DNS_FROM_RFC_WHOIS,FORGED_RCVD_HELO,HTML_10_20,HTML_BADTAG_30_40,HTML_IMAGE_ONLY_24,HTML_MESSAGE,HTML_NONELEMENT_30_40,MIME_HTML_NO_CHARSET,RCVD_BY_IP,SPF_PASS X-Spam-Check-By: apache.org Received: from [202.144.76.26] (HELO sifyr3.maa.sify.net) (202.144.76.26) by apache.org (qpsmtpd/0.27.1) with ESMTP; Mon, 23 Aug 2004 05:31:39 -0700 Received: (sifymail 11763 invoked by uid 7007); 23 Aug 2004 17:57:09 +0530 Received: from 202.144.76.26 (HELO cetus78.maa.sify.net) (202.144.76.26) by 202.144.76.26 with SMTP; 23 Aug 2004 17:57:09 +0530 Received: (sifymail 9144 invoked by uid 507); 23 Aug 2004 17:57:09 +0530 Received: from 202.144.76.78 (HELO cetus78.maa.sify.net) (202.144.76.78) by 202.144.76.78 with SMTP; 23 Aug 2004 17:57:09 +0530 Received: (sifymail 9141 invoked by uid 99); 23 Aug 2004 17:57:09 +0530 To: users@cocoon.apache.org Subject: RE: Global variables Message-ID: <1093264029.4129e29ddf155@mail.sify.com> Date: Mon, 23 Aug 2004 17:57:09 +0500 (IST) From: Adriano Smith MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-MOQ1093264029a7ae7765a389dd243b4ae0c39769e3cd" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ---MOQ1093264029a7ae7765a389dd243b4ae0c39769e3cd Content-Type: text/plain Content-Transfer-Encoding: 8bit How is it possible to differentiate between javamail session and cocoon environment session inside the same XSP ? Error is seen when i try to use both Type mismatch: cannot convert from org.apache.cocoon.environment.Session to javax.mail.Session\" Quoting robby.pelssers@vodafone.com: > Here is an example of a global variable \'title\' > language=\"java\" > xmlns:xsp=\" http://apache.org/xsp\"> > > > java.sql.* > java.text.* > java.util.* > > > > <xsp:expr>title</xsp:expr> > > > > private String title = \"Here comes title \"; > > > > > To use objects declared in other xsp, you can make use of > > org.apache.cocoon.environment.Request > org.apache.cocoon.environment.Session > > in xsp where you declare object/variable > Session session = request.getSession(); > session.setAttribute(\"mytitle\", title); > > in xsp where you want to use object/variable > Session session = request.getSession(); > String title = (String)session.getAttribute(\"mytitle\"); > session.removeAttribute(\"mytitle\"); > > -----Original Message----- > From: Adriano Smith [mailto:orosmith@sify.com] > Sent: 23 August, 2004 12:42 > To: users@cocoon.apache.org > Subject: Global variables > > > How can global variables be declared in xsp? > > Also how can objects declared in one xsp be accessed in another? > > > > m> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org > For additional commands, e-mail: users-help@cocoon.apache.org > > ---MOQ1093264029a7ae7765a389dd243b4ae0c39769e3cd Content-Type: text/html Content-Transfer-Encoding: 8bit How is it possible to differentiate between javamail session and cocoon environment session inside the same XSP ? Error is seen when i try to use both Type mismatch: cannot convert from org.apache.cocoon.environment.Session to javax.mail.Session\" Quoting robby.pelssers@vodafone.com: > Here is an example of a global variable \'title\' > <xsp:page > language=\"java\" > xmlns:xsp=\" <http://apache.org/xsp> http://apache.org/xsp\"> > > <xsp:structure> > <xsp:include>java.sql.*</xsp:include> > <xsp:include>java.text.*</xsp:include> > <xsp:include>java.util.*</xsp:include> > </xsp:structure> > > <svgmenu width=\"50\"> > <title><xsp:expr>title</xsp:expr></title> > </svgmenu> > > <xsp:logic> > private String title = \"Here comes title \"; > </xsp:logic> > </xsp:page> > > > To use objects declared in other xsp, you can make use of > > <xsp:include>org.apache.cocoon.environment.Request</xsp:include> > <xsp:include>org.apache.cocoon.environment.Session</xsp:include> > > in xsp where you declare object/variable > Session session = request.getSession(); > session.setAttribute(\"mytitle\", title); > > in xsp where you want to use object/variable > Session session = request.getSession(); > String title = (String)session.getAttribute(\"mytitle\"); > session.removeAttribute(\"mytitle\"); > > -----Original Message----- > From: Adriano Smith [mailto:orosmith@sify.com] > Sent: 23 August, 2004 12:42 > To: users@cocoon.apache.org > Subject: Global variables > > > How can global variables be declared in xsp? > > Also how can objects declared in one xsp be accessed in another? > > > > <http://ads.sify.com/RealMedia/ads/click_nx.ads/mail.sify.com/sentmail@Botto > m> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org > For additional commands, e-mail: users-help@cocoon.apache.org > > ---MOQ1093264029a7ae7765a389dd243b4ae0c39769e3cd--