@@ -0,0 +1,1080 @@
+/**%0A * %0A */%0Apackage eu.earthobservatory.org.StrabonEndpoint;%0A%0Aimport javax.servlet.ServletContextEvent;%0Aimport javax.servlet.ServletContextListener;%0A%0Aimport org.springframework.web.context.WebApplicationContext;%0Aimport org.springframework.web.context.support.WebApplicationContextUtils;%0A%0A/**%0A * @author Charalampos Nikolaou %3Ccharnik@di.uoa.gr%3E%0A *%0A */%0Apublic class ConfigureCommon implements ServletContextListener %7B%0A%0A%09private Common commonBean;%0A%0A%09@Override%0A%09public void contextDestroyed(ServletContextEvent event) %7B%0A%09%7D%0A%0A%09@Override%0A%09public void contextInitialized(ServletContextEvent event) %7B%0A%09%09WebApplicationContext applicationContext = WebApplicationContextUtils.getWebApplicationContext(event.getServletContext());%0A%09%09//event.getServletContext().setAttribute(%22commonBean%22, (Common) applicationContext.getBean(%22commonBean%22));%0A%09%09commonBean = (Common) applicationContext.getBean(%22commonBean%22);%0A%09%09event.getServletContext().setAttribute(%22commonBean%22, this.commonBean);%0A%09%09%0A%09%09System.out.println(%22HOOLA HOOLA HOOLA HOOLA HOOLA HOOLA HOOLA HOOLA%22);%0A%09%09System.out.println(commonBean);%0A%09%7D%0A%7D%0A

add ConfigureCommon listener to load Common bean