Lately I've been doing several things where I need to read the values
of cookies. Using the Request Generator works, but considering all of the cookies are crammed together in a semi-colon separated string, it can make it a bit difficult to work with cookie values in XPath. To make my job a little easier, I wrote a simple processor to parse those values and output them in an easy-to-swallow format. Since this seems like something that other people might find useful, I thought I would pass it along. If the Orbeon guys want to take it, feel free. (just replace my name with yours, attribution appreciated) Otherwise, the mailing list archive will serve as it's home. The processor is very simple. It takes no inputs, and returns as it's output a <cookies> element containing 0 to many <cookie> elements, each containing a <name> and <value> element. Note: Don't be confused by it's name. I call it a generator because it generates an XML representation of the cookies sent with the current request. It does not generate cookies on the client. -- Daniel E. Renfer http://kronkltd.net/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws CookieGenerator.java (5K) Download Attachment |
Administrator
|
Hi Daniel,
Thank you for sharing this with the community! Alex On 7/16/07, Daniel E. Renfer <[hidden email]> wrote: > Lately I've been doing several things where I need to read the values > of cookies. Using the Request Generator works, but considering all of > the cookies are crammed together in a semi-colon separated string, it > can make it a bit difficult to work with cookie values in XPath. > > To make my job a little easier, I wrote a simple processor to parse > those values and output them in an easy-to-swallow format. Since this > seems like something that other people might find useful, I thought I > would pass it along. If the Orbeon guys want to take it, feel free. > (just replace my name with yours, attribution appreciated) Otherwise, > the mailing list archive will serve as it's home. > > The processor is very simple. It takes no inputs, and returns as it's > output a <cookies> element containing 0 to many <cookie> elements, > each containing a <name> and <value> element. > > Note: Don't be confused by it's name. I call it a generator because it > generates an XML representation of the cookies sent with the current > request. It does not generate cookies on the client. > > -- > Daniel E. Renfer > http://kronkltd.net/ > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > > -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |