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 [EMAIL PROTECTED]:
> Here is an example of a global variable \'title\'
> language=\"java\"
> xmlns:xsp=\" http://apache.org/xsp\">
>
>
> java.sql.*
> java.text.*
> java.util.*
>
>
>
> title
>
>
>
> 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:[EMAIL PROTECTED]
> Sent: 23 August, 2004 12:42
> To: [EMAIL PROTECTED]
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>