ServletContext servletContext = getServletContext();
//
String contextPath = (String)m.invoke(servletContext);
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
GenericWebAppContext webAppContext = new GenericWebAppContext(servletContext, contextPath, classLoader);
//
GenericServletContainerContext.register(webAppContext, "/gateinservlet");
this.contextPath = contextPath;
this.servletContext = servletContext;