Kizspy | Question: 28 (Choose 1 answer)
public class Session ExampleServlet extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
// TODO: Your code here
}
} In the doGet method, how to create a new session for the user if the session doesn't exist?
A. 'HttpSession session = request.createSession();'
B. 'HttpSession session = request.getSession();'
C. 'HttpSession session = new HttpSession();'
D. 'HttpSession session = response.createSession();'