监听器(2)

mac2026-08-04  0

本系列博客汇总在这里:监听器汇总

目录

一、监听服务器的启动和关闭二、监听器任务调度


一、监听服务器的启动和关闭

1、编写 MyServletContextListener 类,实现 ServletContextListener 接口。 2、在 web.xml 文件中部署监听器。 3、开关服务器查看效果。

二、监听器任务调度

1、编写 MyServletContextListener_task 类,实现 ServletContextListener 接口。 1、编写 ScheduleServer 类,实现 Runnable 接口。 2、在 web.xml 文件中部署监听器。 3、启动服务器查看效果。 如有错误,欢迎指正!

最新回复(0)