|
Java™ by example!
|
|
|
How do I determine whether cookies are enabled from within a JSP?
The following JSP prints out whether cookies are enabled or not. It does so by setting a temporary cookie, redirecting to itself and checking whether the cookie is still there. DetectCookieSupport.jsp:
To test it out, go to http://www.javaspace.com/docs/DetectCookieSupport.jsp. To disable cookies in IE6, go to Tools -> Internet Options -> Privacy -> Advanced -> block all and restart your browser.
Further Information
Author of answer: Joris Van den Bogaert
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|