title: Error instantiating servlet class org.springframework.web.servlet.Dispatcherservlet
body: <p>I am using <code>spring 4.0.4 RELEASE.jar</code> but i got class not found exception.
  Here is my <code>web.xml</code></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"  
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
  http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID"
  version="3.0"&gt;
  &lt;display-name&gt;SpringMvcApplication&lt;/display-name&gt;
  &lt;servlet&gt;
     &lt;servlet-name&gt;spring-dispatcher&lt;/servlet-name&gt;
    &lt;servlet-class&gt;org.springframework.web.servlet.Dispatcherservlet&lt;/servlet-class&gt;
   &lt;/servlet&gt;
     &lt;servlet-mapping&gt;
   &lt;servlet-name&gt;spring-dispatcher&lt;/servlet-name&gt;
     &lt;url-pattern&gt;/&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>Here is my <code>spring-dispatcher-servlet.xml</code>  code</p>
  
  <pre><code>&lt;beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
    http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
    http://www.springframework.org/schema/context
    http://www.springframework.org/schema/context/spring-context-4.0.xsd"&gt;
   &lt;context:component-scan base-package="com.javahash.spring.controller" /&gt;
         &lt;bean id="HandlerMapping" name="/welcome.html"
    class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping"       /&gt;
     &lt;bean name="/welcome.html"   
        class="com.manikant.hellocontroller.HelloController"/&gt;    
     &lt;bean id= "viewResolver"  
  
   class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
             &lt;property name="prefix" value="/WEB-INF/" /&gt;
         &lt;property name="suffix" value=".jsp" /&gt;
      &lt;/bean&gt;
   &lt;/beans&gt;
  </code></pre>
  
  <p>And here is the stacktrace :</p>
  
  <pre><code>javax.servlet.ServletException: Error instantiating servlet class org.springframework.web.servlet.Dispatcherservlet
              org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
              org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
              org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
              org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
              org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
              org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
              org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
              org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
              java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
              java.lang.Thread.run(Thread.java:745)
  
                  java.lang.ClassNotFoundException:        
          org.springframework.web.servlet.Dispatcherservlet
              org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1308)
              org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1142)
              org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
              org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
              org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
              org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
              org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
              org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
              org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
              org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
              java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
              java.lang.Thread.run(Thread.java:745)
  </code></pre>