Execute code after Glassfish Web Deployment [duplicate]

风流意气都作罢 提交于 2019-12-01 14:18:35

Option 1: In Glassfish you have the Lifecycle modules

Option 2: You also have the ability to code a ServletContextListener to be triggered when the context is loaded:

public class MyServlet implements ServletContextListener {

  public void contextInitialized(ServletContextEvent e) {
         // implementation code
  }

  public void contextDestroyed(ServletContextEvent e) {
         // implementation code
  }
}

Reference:

Yes @Jaynathan Leung, with soapUI can you deployment the web services and testing your programming with input and output data. I hope help you. :)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!