摘要: 使用 注解 接收前台的配置,使用反射进行方法的调用 @Override protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { // 阅读全文
posted @ 2020-11-16 16:52 哇噻哇噻 阅读(109) 评论(0) 推荐(0)
摘要: 3.x 以下的版本,实现Servlet 请求,必须在Web.xml 配置文件中进行servlet 的映射配置 3.x 以上的版本,添加了注解实现,可以简化web.xml 的代码,写起来非常方便 阅读全文
posted @ 2020-11-16 16:51 哇噻哇噻 阅读(366) 评论(0) 推荐(0)
摘要: . Servlet 它就是Servlet 的核心接口,也是根接口 直接实现该接口,必须要实现它定义的5个方法, 也就是他对应的生命周期的方法 GenericServlet : 是Servlet 接口的第一个实现类,将里面的其他方法进行实现,留下必须要去做的service 方法。 但是我使用这个Gen 阅读全文
posted @ 2020-11-16 16:50 哇噻哇噻 阅读(48) 评论(0) 推荐(0)