Because the DataFactory class implements the ServletContextListener interface, it guarantees that its init method is called when the servlet context is first created.
因为DataFactory类实现了ServletContextListener接口,所以可以保证在第一次创建servlet上下文时调用其init方法。
Fortunately, because I'm writing a simple web application to be deployed on GAE, I can use the Servlet API to register my two classes in a ServletContextListener instance.
幸运的是,由于我在编写一个要部署到GAE上的简单web应用程序,我可以使用ServletAPI来注册ServletContextListener实例中的两个类。
Fortunately, because I'm writing a simple web application to be deployed on GAE, I can use the Servlet API to register my two classes in a ServletContextListener instance.
幸运的是,由于我在编写一个要部署到GAE上的简单web应用程序,我可以使用ServletAPI来注册ServletContextListener实例中的两个类。
应用推荐