日期:2014-05-16  浏览次数:20278 次

如何在jsp中得到spring的上下文
ApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(request.getSession().getServletContext());
net.xxx.xxx.xx.service.XXService xService = (net.xxx.xxx.xx.service.XXServicee)ctx.getBean("xService");