Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is the purpose of the ContextLoaderListener

 
Daniel Sagayaraj
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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>
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
 
Daniel Sagayaraj
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Initializes Spring on application startup.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic