Make a file named springexp-servlet.xml in WEB-INF directory. It is named based on the servlet-name from web.xml with '-servlet' appended to it. Put following line of code there. This file describes that dispacther servlet will use springexpController as one of its controller. A URL mapping also has added so the DispatcherServlet can know which controller should be invoked for different URL's.
<beans> <bean id="springexpController" class="SpringexpController"/> <bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping "> <property name="mappings"> <props> <prop key="/hello.htm">springexpController</prop> </props> </property> </bean> </beans>