Created
March 1, 2013 00:00
-
-
Save zzzfree/5061241 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jsp中处理: | |
<% | |
//第三种方式 | |
ServletContext servletContext = request.getSession().getServletContext(); | |
ApplicationContext ctx=WebApplicationContextUtils.getWebApplicationContext(servletContext); | |
out.println(ctx);//测试 | |
%> | |
这种方式一般用于在jsp中取Manager,当然其他的你能get到的 都可以获得 | |
jsp 中导入的包 | |
<%@ page import="org.springframework.web.context.support.WebApplicationContextUtils,org.springframework.context.ApplicationContext" %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment