%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ page import="java.time.LocalDateTime" %> <% javax.servlet.http.Cookie c = new javax.servlet.http.Cookie("test", "test"); c.setPath("/test"); javax.servlet.http.Cookie cc = new javax.servlet.http.Cookie("test", "test"); cc.setPath("/test2"); response.addCookie(c); response.addCookie(cc); %>