When using this
<
servlet>
<servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
</servlet>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>mvc-dispatcher-servlet.xml</param-value>
</context-param>
i'm getting exception like ...
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/mvc-dispatcher-servlet.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/mvc-dispatcher-servlet.xml]
Also tried with
<servlet>
<servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
1) what is difference between applicationContext.xml and mvc-dispatcher.servlet.xml ?
2) Why Dispatcher servlet always looking for the init-param contextConfigLocation as "applicationContext.xml" only, if i gave something else it's throwing the IOException and saying not able to get "applicationContext.xml"
3) If i'm not giving the <init-param> and gave <context-param> contextConfigLocation as "<servlet-name>-servlet.xml", it's working fine. Then is there any difference in bean scope declaration if we configured as <context-param> instead <init-param>
4) <context-param> contextConfigLocation is always taking "<servlet-name>-servlet.xml", are we have chance to change that name ?
5) If we're not able change the <context-param> contextConfigLocation value, how we can provide multiple context for an application in spring MVC ?