Context loader Servlet is used in Spring framework to load parameters at application start up. Add following lines of code in web.xml to load classes at application context.

Web.xml

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

SampleSupport.xml

<beans>
<bean id="accounting" class="springexample.services.Accounting">
</bean>
<bean id="authentication" class="springexample.services.Authentication">
</bean>
</beans>