V
V
Vlad Revuk2015-01-02 01:37:35
Java
Vlad Revuk, 2015-01-02 01:37:35

How to put data in cookies in java??

You need to read the file and write a number from it to cookies using java.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Y
Yurii Nekrasov, 2016-01-07
@driversti

And what's the problem with opening a file (FileInputStream), reading the value and writing it to a file with cookies? Or create a cookie file? Explain in more detail what you have and how you want to implement?

A
angry_cellophane, 2016-01-08
@angry_cellophane

What a question - such an answer. Let's go: working with cookies in spring - viralpatel.net/blogs/spring-mvc-cookie-example

M
Maxim, 2016-01-10
@z17

In a servlet

Cookie cookie = new Cookee(key, value);
response.addCookie(cookie);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question