PRJ301_-_SP_2023_-_FE_125.webp
M

PRJ301_-_SP_2023_-_FE_125.webp

  • Media owner Maki95
  • Ngày thêm
Multiple Choices
Answer (Choose 1 answer)
<
Ex
Consider the following doGet method code of a servlet:
public void doGet(HttpServletRequest req, HttpServletResponse res)
String command = req.getParameter("command");
if("remove".equals(command))
{
}
HttpSession session = req.getSession();//insert code here
If the command equals remove, you want to remove all the attributes from the session. Whic option will you use? (Choose one)
A. session.removeAll();
B. session.invalidate();
C. Enumerate the attribute names and remove them one by one from the session using removeAttribute(name) method.
D. session.unbind();

Thông tin

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

Share this media

Back
Bên trên Bottom