在Java Web应用开发中,HttpServlet的doPost方法定义如下,则能正确获取HttpSession对象的语句是( )。Public void doPost(HttpServletRequest request,HttpServletRe

admin2014-09-10  47

问题 在Java Web应用开发中,HttpServlet的doPost方法定义如下,则能正确获取HttpSession对象的语句是(   )。Public void doPost(HttpServletRequest request,HttpServletResponse response)
Throws ServletException,IOException{
//省略此处代码
}

选项 A、HttpSession session = request.getSession(true);
B、HttpSession session = request.getHttpSession(true);
C、HttpSession session = response.getSession(true);
D、HttpSession session = response.getHttpSession(true);

答案A

解析
转载请注明原文地址:https://jikaoti.com/ti/Pg0iFFFM
0

最新回复(0)