title: Resource not found(404) when adding ContextLoaderListener and RequestContextListener in web.xml
body: <p>when I am adding <code>ContextLoaderListener</code> to my <code>web.xml</code> then got the message of resource not found(404). when I am remove the listener class from <code>web.xml</code> then my <code>index.php</code> running but adding </p>
  
  <pre><code>&lt;listener&gt;
      &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt; 
  &lt;/listener&gt; 
  &lt;listener&gt;
      &lt;listener-class&gt;org.springframework.web.context.request.RequestContextListener&lt;/listener-class&gt; 
  &lt;/listener&gt;
  </code></pre>
  
  <ul>
  <li>this two lines give me the resource not found error <strong>eclipse kepler</strong> version.When I am adding these two lines in <code>web.xml</code> and prepare the code as it was then heading this error:</li>
  </ul>
  
  <blockquote>
    <p>java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered?</p>
  </blockquote>
  
  <p>I am tried hard and I am new to spring framework. Can you tell me is anything setup needed for listener or anything else?  </p>
  
  <p>Error in Console:</p>
  
  <pre><code>                               *
  
  Jan 27, 2016 12:47:24 PM org.apache.catalina.core.StandardContext listenerStart
  SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
  org.springframework.beans.factory.BeanDefinitionStoreException: Parser configuration exception parsing XML from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is javax.xml.parsers.ParserConfigurationException: Unable to validate using XSD: Your JAXP provider [org.apache.crimson.jaxp.DocumentBuilderFactoryImpl@1cefe08] does not support XML Schema. Are you running on Java 1.4 or below with Apache Crimson? Upgrade to Apache Xerces (or Java 1.5) for full XSD support.
  </code></pre>
  
  <p>*</p>
  
  <p>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" 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;FutureKid&lt;/display-name&gt;
    &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;index.html&lt;/welcome-file&gt;
      &lt;welcome-file&gt;index.htm&lt;/welcome-file&gt;
      &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
      &lt;welcome-file&gt;default.html&lt;/welcome-file&gt;
      &lt;welcome-file&gt;default.htm&lt;/welcome-file&gt;
      &lt;welcome-file&gt;default.jsp&lt;/welcome-file&gt;
    &lt;/welcome-file-list&gt;
    &lt;listener&gt;
          &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt; 
      &lt;/listener&gt; 
      &lt;listener&gt;
          &lt;listener-class&gt;org.springframework.web.context.request.RequestContextListener&lt;/listener-class&gt; 
      &lt;/listener&gt;
    &lt;servlet&gt;
      &lt;description&gt;&lt;/description&gt;
      &lt;display-name&gt;InputFormServlet&lt;/display-name&gt;
      &lt;servlet-name&gt;InputFormServlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;com.webapp.InputFormServlet&lt;/servlet-class&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;InputFormServlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/input-form&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
    &lt;servlet&gt;
      &lt;description&gt;&lt;/description&gt;
      &lt;display-name&gt;CustomerServlet&lt;/display-name&gt;
      &lt;servlet-name&gt;CustomerServlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;com.webapp.CustomerServlet&lt;/servlet-class&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;CustomerServlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/get-customer&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>