PRJ301_-_SU_2024_-_Block_5_-_FE_2680.webp
free_spirit

PRJ301_-_SU_2024_-_Block_5_-_FE_2680.webp

Kizspy | Question: 31
(Choose 1 answer)
protected void doGet(HttpServletRequest request, HttpServletResponse response)
public class CookieExampleServlet extends HttpServlet {
throws ServletException, IOException {
// TODO: Your code here
}
}
In the doGet method, how to create a Cookie and send it to the client?
A. Cookie newCookie = new Cookie("username", "john_doe"); response.addCookie(newCookie);
B. response.setCookie("username", "john_doe");
C. request.createCookie("username", "john_doe");response.sendCookie();
D. Cookie.create("username", "john_doe");response.writeCookie();
FUOVERFL

Thông tin

Category
PRJ301
Thêm bởi
free_spirit
Ngày thêm
Lượt xem
6,367
Lượt bình luận
45
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom