title: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.Dao.ApplicationDaoImpl] for bean with name '
body: <p>I'm working on a Spring MVC (3.2) + JDBC project, I'm very new to Spring. I'm using Eclipse Europa,Tomcat server and oracle database, I'm not using maven.</p>
  
  <p>I have seen many questions on stackoverflow, but none of the answers solve my issue.
  When I'm running my project I'm getting this error:</p>
  
  <pre><code>SEVERE: Context initialization failed
  org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.Dao.ApplicationDaoImpl] for bean with name 'ApplicationDao' defined in ServletContext resource [/WEB-INF/spring-servlet.xml]; nested exception is java.lang.ClassNotFoundException: com.Dao.ApplicationDaoImpl
      at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1275)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:575)
      at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1344)
      at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:910)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:609)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
      at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:651)
      at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:599)
      at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:665)
      at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:518)
      at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:459)
      at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
      at javax.servlet.GenericServlet.init(GenericServlet.java:160)
      at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
      at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
      at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5123)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5407)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
  Caused by: java.lang.ClassNotFoundException: com.Dao.ApplicationDaoImpl
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1713)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1558)
      at org.springframework.util.ClassUtils.forName(ClassUtils.java:260)
      at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:416)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1296)
      at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1267)
      ... 25 more
  
  Aug 19, 2014 1:03:46 PM org.apache.catalina.core.ApplicationContext log
  SEVERE: StandardWrapper.Throwable
  org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.Dao.ApplicationDaoImpl] for bean with name 'ApplicationDao' defined in ServletContext resource [/WEB-INF/spring-servlet.xml]; nested exception is java.lang.ClassNotFoundException: com.Dao.ApplicationDaoImpl
      at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1275)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:575)
      at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1344)
      at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:910)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:609)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
      at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:651)
      at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:599)
      at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:665)
      at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:518)
      at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:459)
      at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
      at javax.servlet.GenericServlet.init(GenericServlet.java:160)
      at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
      at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
      at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5123)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5407)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
  Caused by: java.lang.ClassNotFoundException: com.Dao.ApplicationDaoImpl
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1713)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1558)
      at org.springframework.util.ClassUtils.forName(ClassUtils.java:260)
      at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:416)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1296)
      at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1267)
      ... 25 more
  
  Aug 19, 2014 1:03:46 PM org.apache.catalina.core.StandardContext loadOnStartup
  SEVERE: Servlet /WebNew threw load() exception
  java.lang.ClassNotFoundException: com.Dao.ApplicationDaoImpl
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1713)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1558)
      at org.springframework.util.ClassUtils.forName(ClassUtils.java:260)
      at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:416)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1296)
      at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1267)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:575)
      at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1344)
      at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:910)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:609)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
      at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:651)
      at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:599)
      at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:665)
      at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:518)
      at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:459)
      at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
      at javax.servlet.GenericServlet.init(GenericServlet.java:160)
      at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
      at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
      at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5123)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5407)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
  
  Aug 19, 2014 1:03:46 PM org.apache.coyote.AbstractProtocol start
  INFO: Starting ProtocolHandler ["http-bio-8080"]
  Aug 19, 2014 1:03:46 PM org.apache.coyote.AbstractProtocol start
  INFO: Starting ProtocolHandler ["ajp-bio-8009"]
  Aug 19, 2014 1:03:46 PM org.apache.catalina.startup.Catalina start
  INFO: Server startup in 5155 ms
  Aug 19, 2014 1:03:48 PM org.apache.catalina.core.ApplicationContext log
  INFO: Initializing Spring FrameworkServlet 'spring'
  Aug 19, 2014 1:03:48 PM org.springframework.web.servlet.FrameworkServlet initServletBean
  INFO: FrameworkServlet 'spring': initialization started
  Aug 19, 2014 1:03:48 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
  INFO: Refreshing WebApplicationContext for namespace 'spring-servlet': startup date [Tue Aug 19 13:03:48 IST 2014]; parent: Root WebApplicationContext
  Aug 19, 2014 1:03:48 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
  INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/spring-servlet.xml]
  Aug 19, 2014 1:03:48 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
  INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@19a3e0c: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,viewResolver,ApplicationDao,ApplicationService,dataSource,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@702d3c
  Aug 19, 2014 1:03:48 PM org.springframework.beans.factory.support.DefaultSingletonBeanRegistry destroySingletons
  INFO: Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@19a3e0c: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,viewResolver,ApplicationDao,ApplicationService,dataSource,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@702d3c
  Aug 19, 2014 1:03:48 PM org.springframework.web.servlet.FrameworkServlet initServletBean
  SEVERE: Context initialization failed
  org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.Dao.ApplicationDaoImpl] for bean with name 'ApplicationDao' defined in ServletContext resource [/WEB-INF/spring-servlet.xml]; nested exception is java.lang.ClassNotFoundException: com.Dao.ApplicationDaoImpl
      at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1275)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:575)
      at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1344)
      at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:910)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:609)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
      at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:651)
      at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:599)
      at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:665)
      at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:518)
      at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:459)
      at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
      at javax.servlet.GenericServlet.init(GenericServlet.java:160)
      at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
      at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:865)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:136)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:947)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1009)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
  Caused by: java.lang.ClassNotFoundException: com.Dao.ApplicationDaoImpl
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1713)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1558)
      at org.springframework.util.ClassUtils.forName(ClassUtils.java:260)
      at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:416)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1296)
      at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1267)
      ... 30 more
  
  Aug 19, 2014 1:03:48 PM org.apache.catalina.core.ApplicationContext log
  SEVERE: StandardWrapper.Throwable
  org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.Dao.ApplicationDaoImpl] for bean with name 'ApplicationDao' defined in ServletContext resource [/WEB-INF/spring-servlet.xml]; nested exception is java.lang.ClassNotFoundException: com.Dao.ApplicationDaoImpl
      at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1275)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:575)
      at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1344)
      at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:910)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:609)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
      at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:651)
      at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:599)
      at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:665)
      at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:518)
      at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:459)
      at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
      at javax.servlet.GenericServlet.init(GenericServlet.java:160)
      at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
      at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:865)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:136)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:947)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1009)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
  Caused by: java.lang.ClassNotFoundException: com.Dao.ApplicationDaoImpl
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1713)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1558)
      at org.springframework.util.ClassUtils.forName(ClassUtils.java:260)
      at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:416)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1296)
      at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1267)
      ... 30 more
  </code></pre>
  
  <p>This is my web.xml file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns="http://java.sun.com/xml/ns/javaee"
      xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
      id="WebApp_ID" version="2.5"&gt;
      &lt;display-name&gt;spring&lt;/display-name&gt;
      &lt;welcome-file-list&gt;
          &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
      &lt;/welcome-file-list&gt;
      &lt;servlet&gt;
          &lt;servlet-name&gt;spring&lt;/servlet-name&gt;
          &lt;servlet-class&gt;
              org.springframework.web.servlet.DispatcherServlet
          &lt;/servlet-class&gt;
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;spring&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
      &lt;listener&gt;
          &lt;listener-class&gt;
              org.springframework.web.context.ContextLoaderListener
          &lt;/listener-class&gt;
      &lt;/listener&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>This is my index.jsp:</p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
      pageEncoding="ISO-8859-1"%&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
  &lt;title&gt;Insert title here&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;h3&gt;hello&lt;/h3&gt;
  &lt;%response.sendRedirect("AppMgt_AddnewApp");%&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This is AppMgt_AddnewApp.jsp:</p>
  
  <pre><code>&lt;div id="addnewBox_app"&gt;
    &lt;form:form method="post" action="/insert" modelAttribute="application"&gt;  
          &lt;table&gt;
              &lt;tr align="left"&gt;
                  &lt;td&gt;APPID&lt;/td&gt;
  
                  &lt;td&gt;&lt;form:input path="id" readonly="true" size="8"  disabled="true" id="txt"/&gt;
              &lt;form:hidden path="id" /&gt;&lt;/td&gt;
                  &lt;td&gt;*&lt;/td&gt;
              &lt;/tr&gt;
  
              &lt;tr align="left"&gt;
                  &lt;td&gt;APPCODE&lt;/td&gt;
                  &lt;td&gt;&lt;form:input path="AppCode" /&gt;&lt;/td&gt;
                  &lt;td&gt;*&lt;/td&gt;
              &lt;/tr&gt;
  
              &lt;tr align="left"&gt;
                  &lt;td&gt;APPLICATION&lt;/td&gt;
                  &lt;td&gt;&lt;form:input path="Appname" /&gt;&lt;/td&gt;
                  &lt;td&gt;*&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr align="left"&gt;
                  &lt;td&gt;filed1&lt;/td&gt;
                  &lt;td&gt;&lt;form:select path="city" items="${map.LobList}" /&gt;&lt;/td&gt;
                  &lt;td&gt;*&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr align="left"&gt;
                  &lt;tdfiloed2&lt;/td&gt;
                  &lt;td&gt;&lt;form:input path="geo" /&gt;&lt;/td&gt;
                  &lt;td&gt;*&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr align="left"&gt;
                  &lt;td&gt;DESC&lt;/td&gt;
                  &lt;td&gt;&lt;form:input path="desc" /&gt;&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr align="left"&gt;
                  &lt;td colspan="2" align="center"&gt;&lt;input type="submit" value="Save" class="Appbutton"/&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;input type="button"
                      value="Cancel" class="Appbutton" /&gt;&lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
  &lt;/form:form&gt;&lt;/div&gt;
  
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This is my Controller class:</p>
  
  <pre><code>package com.Controller;
  import java.util.ArrayList;
  
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.stereotype.Controller;
  import org.springframework.ui.Model;
  import org.springframework.validation.BindingResult;
  import org.springframework.web.bind.annotation.*;
  import org.springframework.web.servlet.ModelAndView;
  import com.Beans.Application;
  import com.services.ApplicationService;  
  import java.util.HashMap;   
  import java.util.List;   
  import java.util.Map;      
  
  @Controller  
  public class MyController {
  
      @Autowired  
      ApplicationService applicationService;   
  
      @RequestMapping("/AppMgt_AddnewApp")
      public ModelAndView registerUser(@ModelAttribute Application application,BindingResult result, Model model) {
  
          System.out.println("inside modelandView");
          model.addAttribute("application");
          System.out.println("set the model property");
          List&lt;String&gt; LobList = new ArrayList&lt;String&gt;();
          LobList.add("Asia");
          LobList.add("Australia");
          LobList.add("America");
          LobList.add("Europe");
  
          Map&lt;String, List&gt; map = new HashMap&lt;String, List&gt;();
          map.put("cityList", LobList);
          System.out.println("just before returning modelandView");
          return new ModelAndView("AppMgt_AddnewApp", "map", map);
  
      }
  
      /*@RequestMapping("/insert") 
      public String insertData(@ModelAttribute Application application) {   
          if (application != null)   
              applicationService.addnewApp(application);   
          return "redirect:/AppManagment";   
      }   */
  
  }
  </code></pre>
  
  <p>Could you please explain what I'm doing wrong?</p>