Which three can be placed at line 23 to retrieve an existing HttpSession object?

Given an HttpServletRequest request:
22. String id = request.getParameter(“jsessionid”);
23. // insert code here
24. String name = (String) session.getAttribute(“name”)
Which three can be placed at line 23 to retrieve an existing HttpSession object? (Choose three)

Given an HttpServletRequest request:
22. String id = request.getParameter(“jsessionid”);
23. // insert code here
24. String name = (String) session.getAttribute(“name”)
Which three can be placed at line 23 to retrieve an existing HttpSession object? (Choose three)

A.
HttpSession session = request.getSession();

B.
HttpSession session = request.getSession(id);

C.
HttpSession session = request.getSession(true);

D.
HttpSession session = request.getSession(false);

E.
HttpSession session = request.getSession(“jsessionid”);



Leave a Reply 2

Your email address will not be published. Required fields are marked *