cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 22526] New: - FOM cocoon.request.getCookies()'s cookies can't be read
Date Mon, 18 Aug 2003 16:53:52 GMT
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

Mime
View raw message