(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 unbind an attribute named "user" from the session. Which of the following option will you use? (Choose one)
A. session.unbind("user");
B. session.remove("user");
C. session.deleteAttribute("user");
D. session.removeAttribute("user");
FUO
8