jsp文件:
<%@ page import="javax.servlet.ServletContext" %>
<%@ page import="org.springframework.context.ApplicationContext" %>
<%@ page import="org.springframework.web.context.support.WebApplicationContextUtils" %>
<%
//获取ApplicationContext对象
ServletContext servletContext = request.getSession().getServletContext();
ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(servletContext);
//获取ApplicationContext.xml文件中定义的BEAN
PictureService ps=(PictureService)ac.getBean("pictureService");
posted on 2008-08-19 13:26
紫蝶∏飛揚↗ 阅读(1320)
评论(0) 编辑 收藏 所属分类:
Spring 、
重点