Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Как работать с cookies?
Господа, объясните пожалуйста, как правильно работать с куками?
Значит делаю как здесь - https://vaadin.com/ru/book/-/page/advanced.httpservletrequestlistener.html
public class CookieExampleApplication extends Application
implements HttpServletRequestListener {
HttpServletResponse response;
public void onRequestStart(HttpServletRequest request,
HttpServletResponse response) {
// Store the reference to the response object for
// using it in event listeners
this.response = response;
...
}
Получаю
WARNING: Cannot serialize session attribute com.vaadin.terminal.gwt.server.WebApplicationContext for session 9BEE9A9043DD61ED4845A228BFE49EE2java.io.NotSerializableException: org.apache.catalina.connector.ResponseFacade
ну это я примерно понимаю почему. Но это же код из примера. Как так? Что делать?
Пытался использовать аддон https://vaadin.com/ru/directory#addon/browsercookies. Но что-то куки не сохраняются.
Мне нужно после авторизации пользователя добавить данные авторизации в куки.