jeudi 9 avril 2015

Spring : Need for the contextConfigLocation?

In web.xml we have context parameter set named contextConfigLocation and defined as shown in the below code:



<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/root-context.xml</param-value>
</context-param>


Also the same parameter is set in the Dispatch Servlet as shown below



<servlet>
<servlet-name>spring</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/servlet-context.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>


What is the difference between these two contextConfigLocations ?


Aucun commentaire:

Enregistrer un commentaire