How do you Handle Cookies in Java?
This Anonymous Coward wishes
to know about the following:
"I would like to know if anyone can provide
a good loaction for information concering
creating, retrieving, and generally
working with cookies in Java."
If I recall the Java Servlet API provides for cookie creation/destruction. Better yet it lets you embed java objects into a virtual session layer maintained by java between the server and the client. (with cookies or URL renaming)
Works pretty well w/ Apache. (java.apache.org)
Specifically, read here.
I used a session for creating cookies. Its on a higher layer so you don't see the word cookie in the documentation, but thats how sessions work.. You can see some good examples at
http://www.servlets.com/jsp/examples/index.html
go to chapter 7.
Once you figure out how it is quite easy..
-Aram
I used a session for creating cookies. Its on a higher layer so you don't see the word cookie in the documentation, but thats how sessions work.. You can see some good examples at
http://www.servlets.com/jsp/examples/index.html
go to chapter 7.
Once you figure out how it is quite easy..
-A
When I get a cookie in my Java, I quickly get a spoon or other kitchen utensil to fish it out with. You need to do it quickly, though, otherwise the cookie dissolves.
Generally, the cookie tastes even better with a little java on it. Unless it's some sort of lemon wafer or something.
The comp.lang.java.programmer faq, located here answers that question. And hundreds of other questions.
The next Cmdr Taco duplicate will be ready soon, but subscribers can beat the rush and see it early!
You seem to be confusing cookies with biscuits...a common mistake from one of our american cousins.
And anyway, biscuits, cookies...whatever you want to call them, taste better after being dunked in tea rather than in coffee.
Fang.
It's unclear from your question from what orientation you need to process cookies. If you're effectively a browser, I've been using HTTPClient version 0.3, and all you have to write is a "accept this cookie Y/N" function.