import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;
//struts2 获取ServletContext ServletActionContext.getServletContext();
ServletContext application = getServletContext();
WebApplicationContext wac = WebApplicationContextUtils.getWebApplicationContext(application);
XyManager flightTicketManager = (XyManager) wac.getBean("xyManager ");