In Spring, what is purpose of ContextConfigLocation
and also InternalResourceViewResolver
? I did't get the purpose of these classes.
contexConficLocation
is using in web.xml
file.
This purpose is override the acctual or default XML file in user wish.
It is comeing under the <contex-param>
tag, for example
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>WEB-INF/spring-config.xml,WEB-INF/spring-servlet.xml</param-value>
</context-param>
InternalResourceViewResolver
using inside servlet.xml
file it is comeing under the viewResolver
bean.
Example
<beans>
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="WEB-INF/view/"></property>
<property name="suffix" value=".jsp"></property>
</bean>
</beans>