[Logo]
Forums Register Login
What is the purpose of the ContextLoaderListener
Dear Friends,
I am learning spring.I would like to know when and why we use the ContextLoaderListener.


<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4">

<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>

<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/contacts.xml, /WEB-INF/resources.xml</param-value>
</context-param>

</web-app>
So Spring is initialized on startup.

http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/web/context/ContextLoaderListener.html
 
David Newton wrote:So Spring is initialized on startup.

http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/web/context/ContextLoaderListener.html


Hai David,
I went through the link you had given me.I am sorry that i was not able to visualize the purpose of the ContextLoaderListener.What does ContextLoaderListener do in a web application?
Initializes Spring on application startup.
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards



All times above are in ranch (not your local) time.
The current ranch time is
Dec 14, 2017 15:57:33.