PRJ301_-_SU_2024_-_RE_2458.webp
May76

PRJ301_-_SU_2024_-_RE_2458.webp

  • Media owner May76
  • Ngày thêm
Kizspy | Question: 35
(Choose 1 answer)
FUOVERFL
public class CookieExampleServlet extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse response)
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();

Thông tin

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

Share this media

Back
Bên trên Bottom