Link to home
Start Free TrialLog in
Avatar of Software Programmer
Software Programmer

asked on

Help on Cookie

Below are the couple of questions which needs help regarding cookie

1. I'm developing a standalone jar which access a http site inside the code. When i access the http site will the cookie will be stored in the client machine ??
2. When the cookie will be saved in client's machine ?
3. The cookie will be stored only when we access web application via browser or via any library and executing http request
4. When and how the cookie can be enabled or disabled in a client's machine.

Thanks.
Avatar of mccarl
mccarl
Flag of Australia image

Java itself will NOT manage cookies automatically for you.

Now, depending on what library (if any) you are using to access the HTTP website, cookie handling may be managed for you. And if it is it could be manual or automatic, and can be disabled or enabled as a default. We would need more information on what library you might be using to give any more information than that.
Avatar of Software Programmer
Software Programmer

ASKER

I'm using HttpClient API to login to a web application. (ex:https://hc.apache.org/httpcomponents-client-ga/quickstart.html)
SOLUTION
Avatar of mccarl
mccarl
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The code snippet resolves the problem