Use a ContextLoaderListener in accordance with DispatchServlet
Posted
by Phuong Nguyen de ManCity fan
on Stack Overflow
See other posts from Stack Overflow
or by Phuong Nguyen de ManCity fan
Published on 2010-04-06T06:50:33Z
Indexed on
2010/04/06
6:53 UTC
Read the original article
Hit count: 226
spring-framework
I want to use both ContextLoaderListener (so that I can pass Spring Beans to my servlet) as well as DispatchServlet (Spring MVC). However, currently I have to pass init param to these both class initializer:
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/spring/app-config.xml
</param-value>
So, I use the same xml for these both classes. Wonder if it would lead to my beans being initialized twice? If yes, how would I do to avoid that?
© Stack Overflow or respective owner