@@ -0,0 +1,679 @@
+package com.varone.web.listener;%0A%0Aimport java.io.File;%0A%0Aimport javax.servlet.ServletContextEvent;%0Aimport javax.servlet.ServletContextListener;%0A%0Aimport com.var.web.util.VarOneEnv;%0A%0Apublic class VarOneServletContextListener implements ServletContextListener %7B%0A%0A%09@Override%0A%09public void contextInitialized(ServletContextEvent sce) %7B%0A%09%09VarOneEnv env = new VarOneEnv();%0A%09%09File varOneConfPath = env.createVarOneConfPath();%0A%09%09if(!env.checkHadoopConfXMLFile(varOneConfPath))%7B%0A%09%09%09throw new RuntimeException(%22Please confirm you hdfs-site.xml and yarn-site.xml file to the %22 + varOneConfPath);%0A%09%09%7D%0A%09%09%0A%09%09%0A%09%7D%0A%0A%09@Override%0A%09public void contextDestroyed(ServletContextEvent sce) %7B%0A%09%09%0A%09%09%0A%09%09%0A%09%7D%0A%0A%7D%0A

Create a VarOneServletContextListener class and implement the ServletContextLietener