In this section, we will show how to work with the cookies in the servlets in depth. As mentioned in the preceding section, we need the addCookie method of the response. To make a complete sample of an operation with the cookies, we must first introduce the JSP pages.
Cookies
JSP pages
JSP is a technology that is present since the first J2EE 1.2, and it has been created to simplify the development of web pages.
What the servlet writes through the writer of the response in a JSP page is just rendered automatically. To understand this better, let's take the servlet seen in the servlets and Web components paragraph as an example. To render the page in a servlet, we need the following code in our Java code:
response.getWriter...