public class ServletFoo extends HttpServlet{ public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException IOException{ System.out.println(“get”); } public void doPost(HttpServletRequestrequest.HttpServletResponse response) throws ServletException,IOException{ System.out.println(“post”); doGet(reauest,response); } } 用户在浏览器地址栏中键入正确的请求URL并回车后,在控制台上显示的结果是( )。 A.get B.post C.get post D.post get正确答案:A
1 回答
大咪
TA贡献785条经验 获得超332个赞
public void doPost(HttpServletRequestrequest.HttpServletResponse response) throws ServletException,IOException{ System.out.println(“post”); doGet(reauest,response); } }
看后面这句话,是让dopost做了和doget一样的操作,所以输出了get...所以选a,不明白后面的课程里我记得有讲到……
添加回答
举报
0/150
提交
取消