<
listener
>
<
listener-class
>
org.springframework.web.context.ContextLoaderListener
</
listener-class
>
</
listener
>
|
<
servlet
>
<
servlet-name
>
context
</
servlet-name
>
<
servlet-class
>
org.springframework.web.context.ContextLoaderServlet
</
servlet-class
>
<
load-on-startup
>
1
</
load-on-startup
>
</
servlet
>
|
<
context-param
>
<
param-name
>
contextConfigLocation
</
param-name
>
<
param-value
>
/WEB-INF/myApplicationContext.xml
</
param-value
>
</
context-param
>
|
ApplicationContext ctx=WebApplicationContextUtils.getWebApplicationContext();
LoginAction action=(LoginAction)ctx.getBean(
"action"
);
|