ServletContext servletContext = request.getSession().getServletContext(); ApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(servletContext ); WhatBean whatBean = (WhatBean )ctx.getBean( " what " );