You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by H....@MI.unimaas.nl on 2004/11/30 13:21:45 UTC

RE: retrieving a cookie value in flowscript - Email has different SMTP TO: and MIME TO: fields in the email addresses

Try to break it down in steps:

var cookies = cocoon.request.getCookies();
if (cookies.size() > 0) {
   var firstcookie = cookies[0];
   print("first cookie value: " + firstcookie.getValue());
}

HTH.

Bye, Helma

> -----Original Message-----
> From: David Merrilees [mailto:david.merrilees@fenc.org.uk] 
> Sent: Tuesday, 30 November, 2004 13:02
> To: users@cocoon.apache.org
> Subject: RE: retrieving a cookie value in flowscript - Email 
> has different SMTP TO: and MIME TO: fields in the email addresses
> 
> 
> I thought that. Both methods produce the same error, as does 
> getName(). 
> 
> -----Original Message-----
> From: robby.pelssers@vodafone.com 
> [mailto:robby.pelssers@vodafone.com] 
> Sent: 30 November 2004 11:18
> To: users@cocoon.apache.org
> Subject: RE: retrieving a cookie value in flowscript - Email 
> has different SMTP TO: and MIME TO: fields in the email addresses
> 
> the function getValue() should return a String... Anyway... 
> shouldn't you use
>  getCookies()[0].getValue() instead of .value()
> 
> http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/environ
> ment/Cooki
> e.ht
> ml
> 
> Kind regards,
> Robby Pelssers
> 
> -----Original Message-----
> From: David Merrilees [mailto:david.merrilees@fenc.org.uk]
> Sent: 30 November, 2004 10:43
> To: users@cocoon.apache.org
> Subject: retrieving a cookie value in flowscript
> 
> 
> I'm having trouble retrieving a cookie value in flowscript. I 
> have a cookie set with the value 'true'. When I retrieve the 
> value using flowscript I receive the error:
> 
> true is not a function.
> 
> org.apache.avalon.framework.CascadingRuntimeException: true 
> is not a function.
> 
> 
> My flowscript:
> 
> function contact() {
> 	var test = cocoon.request.getCookies()[0].value()
> 		cocoon.sendPage( "test.jx", { "test" : test } ); }
> 
> Any ideas?
> 
> David Merrilees
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org