JSP 获取Spring注入的对象

ServletContext sc = this.getServletConfig().getServletContext();
ApplicationContext ac2 = WebApplicationContextUtils.getWebApplicationContext(sc);
ImpDiscountInfoServ serv = (ImpDiscountInfoServ) ac2.getBean("appDiscountInfoServ");

你可能感兴趣的:(ssh)