Kizspy | Question: 27
(Choose 1 answer)
public class SessionExampleServlet 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();"