Hi all, How can we know if cookies are enabled via just the request object we have. I know the way via which we can, - write a cookie - read it back and if we do get value it means cookies are enabled BUT I want to know if there is anyway I can know this information w/o doing these two steps. The reason is, I thought I would write a CookieManager class to add,delete,parse cookies...Now that class would be a stand alone object used in Servlet/JSPs to which I plan to pass a request object and want to have a method in there that says "ifCookiesEnabled()"...you know... I am not very optimistic about the answer here but I am throwing question... Nor I am sure how much worth this CookieManager would be... Thanks! Maulin
Hi, You already gave the right answer to you own question; that's the way to check cookie-awareness of the client. There is no method in the HttpServletRequest to check for cookie-awareness (not even in J2EE 1.4). Enabling this would require all browsers to support such a query ("Do you support cookies Y/N?") from the server. Anyway, your solution will do the trick anyway
This means, I can't write a single method in a CookieManager class I have that says, ifCookiesEnabled(HttpServletRequest request)... Thanks for confirming my belief , Eelco. Regards Maulin
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.