/* * @WebServlet自动注解:相当于在web.xml文件中配置了servlet */ @WebServlet("/servletDemo1") public class ServletDemo1 extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { // System.out.println("haha"); } @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { doGet(req, resp); } }
标签:resp,req,HttpServletResponse,WebServlet,自动,Override,注解 From: https://www.cnblogs.com/weiduaini/p/17242873.html