Is it possible in Java (SE, not J2EE) to detect whether cookies are enabled in the default browser?
This isn’t a client/server application. It’s simply a desktop application that happens to interact with the default browser.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I am not sure what you mean by “default browser” but the fundamental thing to understand here is that the code, be it written in Java, C++, Python, you name it, that handles a HTTP request should set a cookie using Set-Cookie and look for what was set being available in Cookie header in the subsequent requests from the browser. If cookies are turned off in the client, then there won’t be a Cookie header in the subsequent requests. A simple redirect to the initial request can also be used to generate a “subsequent” request.