@Caramujo I actually solved the cookie problem with this code
@WebListener
public class ConfigListener implements ServletContextListener {
public static final boolean prod = true;
public void contextInitialized(ServletContextEvent sce) {
ServletContext servletContext = sce.getServletContext();
SessionCookieConfig scc =
servletContext.getSessionCookieConfig();
scc.setPath(prod ? "/" : servletContext.getContextPath());
}
public void contextDestroyed(ServletContextEvent sce) {
}
}
so when in production it uses “/” as cookie path and not “/Specificpath”