PRJ301_-_FEB5_-_FA_2023_1299.webp
Q

PRJ301_-_FEB5_-_FA_2023_1299.webp

Answer (Choose 1 answer)
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. Which of the following 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();

Elt

Thông tin

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

Image metadata

Filename
PRJ301_-_FEB5_-_FA_2023_1299.webp
File size
78.2 KB
Dimensions
1926px x 906px

Share this media

Back
Bên trên Bottom