日期:2014-05-16 浏览次数:20347 次
<jsp:directive.page import="org.springframework.web.context.WebApplicationContext"/>
<% WebApplicationContext context = (WebApplicationContext)this.getServletContext().getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE); TestService service = (TestService)context.getBean("bean ID"); %>