title: HTTP Status 500 - Servlet.init() for servlet spring-dispatcher threw exception
body: <p>I am learning <strong>Spring MVC</strong> and when I am trying to run the html file it gives the error HTTP <em>Status 500</em> - <code>Servlet.init()</code> for servlet spring-dispatcher threw exception</p>
  
  <p>This is my web.xml </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;FirstSpringMVC&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>This is my <strong>spring-dispatcher-servlet</strong> </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
      &lt;beans xmlns="http://www.springframework.org/schema/beans"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:p="http://www.springframework.org/schema/p"
  xmlns:aop="http://www.springframework.org/schema/aop"
  xmlns:tx="http://www.springframework.org/schema/tx"
  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
                      http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
                      http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd"&gt;
  
  
      &lt;bean id="HandlerMapping" class = "org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping"/&gt;
  
      &lt;bean name = "/welcome.html" class = "com.ankitud.hellocontroller.HelloController"/&gt;
  
      &lt;bean id = "viewResolver"
       class = "org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
          &lt;property name = "prefix"&gt;
              &lt;value&gt;/WEB-INF/&lt;/value&gt;
          &lt;/property&gt;
  
          &lt;property name = "suffix"&gt;
              &lt;value&gt;.jsp&lt;/value&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p>This is my jsp page </p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;First MVC Application&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
  
      &lt;h1&gt;First MVC Application&lt;/h1&gt;
      &lt;h2&gt;${welcomemessage}&lt;/h2&gt;      
  
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This is my HelloController class </p>
  
  <pre><code>package com.ankitud.hellocontroller;
  
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  
  import org.springframework.web.servlet.ModelAndView;
  import org.springframework.web.servlet.mvc.AbstractController;
  
  public class HelloController extends AbstractController {
  
      @Override
      protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception{
  
          ModelAndView modelandview = new ModelAndView("HelloPage");
          modelandview.addObject("welcomemessage", "Hi User, welcome to the first Spring MVC application");
  
          return modelandview;
  
      }
  
  }
  </code></pre>
  
  <p>And this is the exception that I am getting </p>
  
  <pre><code>javax.servlet.ServletException: Servlet.init() for servlet spring-dispatcher threw exception
   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:521)
      org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096)
      org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674)
      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>
  
  <p><strong>I am working with Eclipse 4.5.1 , Tomcat 8.0.30 and Spring 4.2.3.</strong></p>