That's solved it, thanks. I don't understand why I couldn't use
getValue() though.

-----Original Message-----
From: Upayavira [mailto:[EMAIL PROTECTED] 
Sent: 30 November 2004 14:10
To: [EMAIL PROTECTED]
Subject: Re: retrieving a cookie value in flowscript - Email has
different SMTP TO: and MIME TO: fields in the email addresses - Email
has different SMTP TO: and MIME TO: fields in the email addresses

David Merrilees wrote:

>cocoon.request.cookies returns an array of all cookies from the domain,
>cocoon.request.getCookie("yourcookie") returns a reference to the 
>cookie object. The problem comes when I try to retrieve the cookie
value.
>
>The getValue() method of the cookie object returns the error "getValue 
>is not a function.
>org.apache.avalon.framework.CascadingRuntimeException: getValue is not 
>a function"
>
>The value() method of the cookie object returns the error "true is not 
>a function. org.apache.avalon.framework.CascadingRuntimeException: true

>is not a function"; true is the cookie value. It is not evaluating the 
>value as a string. It doesn't matter what the value is, it always 
>returns this error.
>  
>
Basically, in java, you have the JavaBeans specification that says that
properties should be accessible via getter and setter methods, so
object.getProperty() and object.setProperty(value).

Now, in Javascript in Cocoon, you can get at properties via
object.property.

Thus, you really want cocoon.request.getCookie("yourcookie").value;

Make sense?

Regards, Upayavira

>I`ve checked out the related bug to this:
>http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22526. It seems to 
>suggest it has not been fixed correctly or I am missing the requisite 
>patch to address this fault. I am using cocoon 2.1.5.1. Do I need a 
>newer version?
>
>-----Original Message-----
>From: Upayavira [mailto:[EMAIL PROTECTED]
>Sent: 30 November 2004 13:35
>To: [EMAIL PROTECTED]
>Subject: Re: retrieving a cookie value in flowscript - Email has 
>different SMTP TO: and MIME TO: fields in the email addresses
>
>Do:
>I've just tried this locally and had it working. A few things to try:
>
>print(cocoon.request.cookies);
>print (cocoon.request.getCookie("yourcookie"));
>
>What does they say?
>
>Remember that a session ID might be your first cookie. That may well 
>not be what you are after.
>
>Regards, Upayavira
>
>David Merrilees wrote:
>
>  
>
>>No, none of that works. I think there is a bug in cocoon. 
>>
>>-----Original Message-----
>>From: [EMAIL PROTECTED]
>>[mailto:[EMAIL PROTECTED]
>>
>>Sent: 30 November 2004 12:22
>>To: [EMAIL PROTECTED]
>>Subject: RE: retrieving a cookie value in flowscript - Email has
>>
>>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
>> 
>>
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to