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 |