WebApplicationContext context = (WebApplicationContext) config.getServletContext (). GetAttribute (WebApplicationContext.Root_Web_Application_Context_attribute);