I have a basic jsp application and when I try to create a cookie, it won't find the library or have any idea what a "Cookie" is. Any ideas why?
<%--
Created by IntelliJ IDEA.
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>Login</title>
</head>
<body>
<div>
<div>
<form method="post">
<div>Username: </div>
<input type="text" name="user"/>
<%
String user = request.getParameter("user");
if (user != null) {
Cookie cookie = new Cookie();
response.addCookie(new Cookie("user", user));
response.sendRedirect("/main.jsp");
}
%>
</form>
</div>
</div>
</body>
</html>