title: HTTP Status 500 - Servlet.init() for servlet Dispatcher threw exception
body: <p>When I'm trying to run this simple html form:</p>
  
  <pre><code>   &lt;html&gt;
         &lt;head&gt;
          &lt;title&gt;Enter a new Page&lt;/title&gt;
         &lt;/head&gt;
  
         &lt;body&gt;
  
            &lt;div id="editPresPage"&gt;
               &lt;form action="editPresPage.do" method="post"&gt; 
              &lt;label&gt;Enter Page ID&lt;/label&gt;&lt;input type="text" name="page_id"/&gt;
              &lt;label&gt;Enter Header1&lt;/label&gt;&lt;input type="text" name="h1"/&gt;
              &lt;label&gt;Enter Header2&lt;/label&gt;&lt;input type="text" name="h2"/&gt;
              &lt;label&gt;Enter Header3&lt;/label&gt;&lt;input type="text" name="h3"/&gt;
              &lt;label&gt;Enter Header4&lt;/label&gt;&lt;input type="text" name="h4"/&gt;            
              &lt;label&gt;Enter Page Text&lt;/label&gt;&lt;input type="text" name="page_text"/&gt;
  
              &lt;input type="submit" value="Add New Page"/&gt;
           &lt;/form&gt;              
            &lt;/div&gt;
  
  
         &lt;/body&gt;
      &lt;/html&gt;
  </code></pre>
  
  <p>I'm getting the error HTTP Status 500 - Servlet.init() for servlet Dispatcher threw exception in my browser.</p>
  
  <p>In my command line window (which opens when I'm running the tomcat's start.batch file) 
  I'm getting the following error:</p>
  
  <blockquote>
    <p>log4j:WARN No appenders could be found for
    logger(org.springframework.web.servlet.dispatcherservlet)</p>
  </blockquote>
  
  <p>My Dispatcher-servlet.xml file:</p>
  
  <pre><code>&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:context="http://www.springframework.org/schema/context"
      xsi:schemaLocation="
          http://www.springframework.org/schema/beans 
          http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
          http://www.springframework.org/schema/context 
          http://www.springframework.org/schema/context/spring-context-3.0.xsd"&gt;       
  
          &lt;import resource="/application.xml"/&gt;
  
          &lt;bean name="/editPresPage.do"
                  class="my.pack.webTier.control.EditPresPageController" &gt;
              &lt;property name="page_manager_service" ref="page_manager_service"/&gt;
          &lt;/bean&gt; 
  
         &lt;!--  I also tried using with annotations --&gt;    
          &lt;!-- &lt;context:component-scan base-package="my.pack"/&gt; --&gt;        
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>My web.xml file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns="http://java.sun.com/xml/ns/javaee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
           version="2.5"&gt;
  
      &lt;servlet&gt;
         &lt;servlet-name&gt;Dispatcher&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;Dispatcher&lt;/servlet-name&gt;
         &lt;url-pattern&gt;*.do&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  
      &lt;!-- Tomcat configuration --&gt;
      &lt;Context path="/myWebApp" docBase="../tomcat\work\Catalina\localhost\mywebapptomcat\work\Catalina\localhost\mywebapp"&gt;
      &lt;Loader
      loaderClass="org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader"/&gt;
      &lt;/Context&gt;
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p>And thats my controller:</p>
  
  <pre><code>package my.pack.webTier.control;
  
  import my.pack.dataAccessTier.domain.Presentation_page;
  import my.pack.serviceTier.services.Page_manager_service;
  
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.stereotype.Controller;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestParam;
  import org.springframework.web.servlet.ModelAndView;
  
  //@Controller
  public class EditPresPageController {
  
      //@Autowired
      private Page_manager_service page_manager_service;
  
      public void setPage_manager_service(Page_manager_service page_manager_service) {
          this.page_manager_service = page_manager_service;
      }
  
      @RequestMapping("/editPresPage")
      public ModelAndView EditPresPage(@RequestParam("page_id") int page_id,
                                       @RequestParam("h1") String h1_value,
                                       @RequestParam("h2") String h2_value,
                                       @RequestParam("h3") String h3_value,
                                       @RequestParam("h4") String h4_value,
                                       @RequestParam("page_text") String page_text)
  
      {
          Presentation_page new_page=new Presentation_page(page_id,h1_value,h2_value,
                  h3_value,h4_value,page_text);
  
          page_manager_service.create_new_page(new_page);
  
  
          return new ModelAndView("/thanks.html");
  
      }
  
  
  }
  </code></pre>
  
  <p>The stacktrace exception:</p>
  
  <pre><code>javax.servlet.ServletException: Servlet.init() for servlet Dispatcher threw exception
      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
      org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
      org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
      org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
      org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
      java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      java.lang.Thread.run(Thread.java:722)
  </code></pre>
  
  <p>I'm working with spring MVC 3.2, eclipse 3.7, springTomcat/7.0.30 and using ANT in my project.</p>
  
  <p>I've searched for an answer for this requirements - and didn't found one.</p>