title: Error: HTTP Status 500 - Servlet.init() for servlet Spring_Test threw exception?
body: <p>I am trying a simple Spring-MVC application which takes input from user and display it on screen. I am getting following error message:</p>
  
  <p>Exception:</p>
  
  <pre><code>javax.servlet.ServletException: Servlet.init() for servlet Spring_Test threw exception
  org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
  org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
  org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
  org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
  org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2466)
  org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2455)
  java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
  java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
  java.lang.Thread.run(Unknown Source)
  </code></pre>
  
  <p>Root Cause:</p>
  
  <pre><code>org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB-INF/Spring_Test-servlet.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/Spring_Test-servlet.xml]
  org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:341)
  org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
  org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
  org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
  org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
  org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
  org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:93)
  org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
  org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)
  org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397)
  org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:467)
  org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:483)
  org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:358)
  org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:325)
  org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127)
  javax.servlet.GenericServlet.init(GenericServlet.java:158)
  org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
  org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
  org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
  org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
  org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2466)
  org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2455)
  java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
  java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
  java.lang.Thread.run(Unknown Source)
  </code></pre>
  
  <p>I am sharing content of my files:</p>
  
  <p>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" 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_3_0.xsd" id="WebApp_ID" version="3.0"&gt;
   &lt;display-name&gt;Spring_Test&lt;/display-name&gt;
  
   &lt;servlet&gt;
    &lt;servlet-name&gt;Spring_Test&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_Test&lt;/servlet-name&gt;
    &lt;url-pattern&gt;/&lt;/url-pattern&gt;
     &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>spring-servlet.xml</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: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;mvc:annotation-driven/&gt;
  &lt;context:component-scan base-package="com.leader" /&gt;
  
  &lt;bean id="viewResolver"
      class="org.springframework.web.servlet.view.UrlBasedViewResolver"&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>Can you please help me to come out of this issue?</p>