Return-Path: Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 27352 invoked by uid 500); 18 Aug 2003 16:51:08 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 27264 invoked from network); 18 Aug 2003 16:51:07 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 18 Aug 2003 16:51:07 -0000 Received: (qmail 6678 invoked by uid 50); 18 Aug 2003 16:53:52 -0000 Date: 18 Aug 2003 16:53:52 -0000 Message-ID: <20030818165352.6677.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: dev@cocoon.apache.org Cc: Subject: DO NOT REPLY [Bug 22526] New: - FOM cocoon.request.getCookies()'s cookies can't be read X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22526 FOM cocoon.request.getCookies()'s cookies can't be read Summary: FOM cocoon.request.getCookies()'s cookies can't be read Product: Cocoon 2 Version: Current CVS 2.1 Platform: PC OS/Version: Windows XP Status: NEW Severity: Normal Priority: Other Component: core AssignedTo: dev@cocoon.apache.org ReportedBy: g.brand@interface-business.de When getting an array of cookies via cocoon.request.getCookies() you can loop over the java array but you cannot get the value of any cookie property, like name or value. You can also not print the cookie. The reason is a forgotten scope and prototype setup in the getCookies method in the FOM_Cocoon.FOM_Request class. I fixed this, see diff below. I would also like to introduce the getCookie method since having only an array of cookies is not that useful. Often one only wants to get a certain cookie. Maybe a method return a map of cookies using the org.apache.cocoon.components.flow.javascript.ScriptableMap would be the better solution (the request supports that with getCookieMap()). What is also hidden in the diff is a jsGet_cookies() that shows how easy it is to return a native javascript array. Seeing that most methods return java collections or enumerations I don't know if that is really wanted here, tho. Remove that method, if not. Otherwise getCookies could return a native js array. Gunnar