在Java Web应用程序中,某HttpServlet的doGet方法如下所示,则在下划线处填写( )代码,可以正确得到RequestDispatcher的对象 public void doGet(HttpServletRequest request

admin2018-06-14  28

问题 在Java Web应用程序中,某HttpServlet的doGet方法如下所示,则在下划线处填写(    )代码,可以正确得到RequestDispatcher的对象 public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException{__________________________//此处填写代码}

选项 A、 RequestDispatcher dispatcher=response.getRequestDispatcher("/test.jsp");
B、 RequestDispatcher dispatcher=new RequestDispatcher();
C、RequestDispatcher dispatcher=RequestDispatcher.getInstance();
D、 RequestDispatcher dispatcher=request.getRequestDispatcher("/test.jsp");

答案D

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

最新回复(0)