This getParameter/cookie thread reminds me of something: it would be
good to have in the servlet API a "Cookie.setEncodedValue" method that
sets a cookie value in an encoded form. The 2.1 spec suggest using
BASE64 for encoding, but the typical BASE64 that is used for MIME mail
etc. includes characters (I think "/") forbidden by RFC2068:
token = 1*<any CHAR except CTLs or tspecials>
tspecials = "(" | ")" | "<" | ">" | "@"
| "," | ";" | ":" | "\" | <">
| "/" | "[" | "]" | "?" | "="
| "{" | "}" | SP | HT
I modified one of the base64 classes out there and produced a
PseudoBase64 class appropriate for cookies. It wasn't difficult, but it
would be good to have such methods available from the servlet API:
Cookie.setEncodedValue
Cookie.getEncodedValue
The present getValue/setValue methods are often useless without such
encoding, as you want at least to store cookie values with white spaces
on it.
Opinions ?
Carlos
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html