You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by bu...@apache.org on 2003/08/18 18:53:52 UTC
DO NOT REPLY [Bug 22526] New: -
FOM cocoon.request.getCookies()'s cookies can't be read
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22526>.
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