title: element listener-class not allowed in my web.xml
body: <p>i got problem with my web.xml. I m getting following error: "element listener-class not allowed here". Anyone knows where could be problem? thx for answers.</p>
  
  <p>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" 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_2_5.xsd" id="WebApp_ID" version="2.5"&gt;
  
      &lt;display-name&gt;zkspringcoresec&lt;/display-name&gt;
  
  
      &lt;context-param&gt;
          &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
          &lt;param-value&gt;
              /WEB-INF/applicationContext-security.xml
          &lt;/param-value&gt;
      &lt;/context-param&gt;
  
      &lt;listener&gt;
          &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
      &lt;/listener&gt;
  
  
      &lt;servlet&gt;
          &lt;servlet-name&gt;DispatcherServlet&lt;/servlet-name&gt;
          &lt;servlet-class&gt;
              org.springframework.web.servlet.DispatcherServlet
          &lt;/servlet-class&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
              &lt;param-value&gt;
                  /WEB-INF/default-servlet.xml
              &lt;/param-value&gt;
          &lt;/init-param&gt;
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
  
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;DispatcherServlet&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  
      &lt;!--Spring security--&gt;
      &lt;filter&gt;
          &lt;filter-name&gt;springSecurityFilterChain&lt;/filter-name&gt;
          &lt;filter-class&gt;org.springframework.web.filter.DelegatingFilterProxy&lt;/filter-class&gt;
      &lt;/filter&gt;
      &lt;filter-mapping&gt;
          &lt;filter-name&gt;springSecurityFilterChain&lt;/filter-name&gt;
          &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
      &lt;/filter-mapping&gt;
      &lt;!--Spring security--&gt;
      &lt;!--ZK--&gt;
      &lt;listener&gt;
          &lt;description&gt;Used to cleanup when a session is destroyed&lt;/description&gt;
          &lt;listener-class&gt;org.zkoss.zk.ui.http.HttpSessionListener&lt;/listener-class&gt;
      &lt;/listener&gt;
  
  
      &lt;servlet&gt;
          &lt;servlet-name&gt;zkLoader&lt;/servlet-name&gt;
          &lt;servlet-class&gt;
              org.zkoss.zk.ui.http.DHtmlLayoutServlet
          &lt;/servlet-class&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;update-uri&lt;/param-name&gt;
              &lt;param-value&gt;/zkau&lt;/param-value&gt;
          &lt;/init-param&gt;
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;zkLoader&lt;/servlet-name&gt;
          &lt;url-pattern&gt;*.zul&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;zkLoader&lt;/servlet-name&gt;
          &lt;url-pattern&gt;*.zhtml&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
      &lt;servlet&gt;
          &lt;description&gt;The asynchronous update engine for ZK&lt;/description&gt;
          &lt;servlet-name&gt;auEngine&lt;/servlet-name&gt;
          &lt;servlet-class&gt;org.zkoss.zk.au.http.DHtmlUpdateServlet&lt;/servlet-class&gt;
      &lt;/servlet&gt;
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;auEngine&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/zkau/*&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
      &lt;!-- [Optional] Session timeout --&gt;
      &lt;session-config&gt;
          &lt;session-timeout&gt;60&lt;/session-timeout&gt;
      &lt;/session-config&gt;
  
      &lt;!-- [Optional] MIME mapping --&gt;
      &lt;mime-mapping&gt;
          &lt;extension&gt;doc&lt;/extension&gt;
          &lt;mime-type&gt;application/vnd.ms-word&lt;/mime-type&gt;
      &lt;/mime-mapping&gt;
      &lt;mime-mapping&gt;
          &lt;extension&gt;gif&lt;/extension&gt;
          &lt;mime-type&gt;image/gif&lt;/mime-type&gt;
      &lt;/mime-mapping&gt;
      &lt;mime-mapping&gt;
          &lt;extension&gt;htm&lt;/extension&gt;
          &lt;mime-type&gt;text/html&lt;/mime-type&gt;
      &lt;/mime-mapping&gt;
      &lt;mime-mapping&gt;
          &lt;extension&gt;html&lt;/extension&gt;
          &lt;mime-type&gt;text/html&lt;/mime-type&gt;
      &lt;/mime-mapping&gt;
      &lt;mime-mapping&gt;
          &lt;extension&gt;jpeg&lt;/extension&gt;
          &lt;mime-type&gt;image/jpeg&lt;/mime-type&gt;
      &lt;/mime-mapping&gt;
      &lt;mime-mapping&gt;
          &lt;extension&gt;jpg&lt;/extension&gt;
          &lt;mime-type&gt;image/jpeg&lt;/mime-type&gt;
      &lt;/mime-mapping&gt;
      &lt;mime-mapping&gt;
          &lt;extension&gt;js&lt;/extension&gt;
          &lt;mime-type&gt;text/javascript&lt;/mime-type&gt;
      &lt;/mime-mapping&gt;
      &lt;mime-mapping&gt;
          &lt;extension&gt;pdf&lt;/extension&gt;
          &lt;mime-type&gt;application/pdf&lt;/mime-type&gt;
      &lt;/mime-mapping&gt;
      &lt;mime-mapping&gt;
          &lt;extension&gt;png&lt;/extension&gt;
          &lt;mime-type&gt;image/png&lt;/mime-type&gt;
      &lt;/mime-mapping&gt;
      &lt;mime-mapping&gt;
          &lt;extension&gt;txt&lt;/extension&gt;
          &lt;mime-type&gt;text/plain&lt;/mime-type&gt;
      &lt;/mime-mapping&gt;
      &lt;mime-mapping&gt;
          &lt;extension&gt;xls&lt;/extension&gt;
          &lt;mime-type&gt;application/vnd.ms-excel&lt;/mime-type&gt;
      &lt;/mime-mapping&gt;
      &lt;mime-mapping&gt;
          &lt;extension&gt;xml&lt;/extension&gt;
          &lt;mime-type&gt;text/xml&lt;/mime-type&gt;
      &lt;/mime-mapping&gt;
      &lt;mime-mapping&gt;
          &lt;extension&gt;zhtml&lt;/extension&gt;
          &lt;mime-type&gt;text/html&lt;/mime-type&gt;
      &lt;/mime-mapping&gt;
      &lt;mime-mapping&gt;
          &lt;extension&gt;zul&lt;/extension&gt;
          &lt;mime-type&gt;text/html&lt;/mime-type&gt;
      &lt;/mime-mapping&gt;
  
  
      &lt;welcome-file-list&gt;
          &lt;welcome-file&gt;index.zul&lt;/welcome-file&gt;
      &lt;/welcome-file-list&gt;
  &lt;/web-app&gt; 
  </code></pre>
  
  <p>i am getting eror in this line: </p>
  
  <pre><code>&lt;listener&gt;
          &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
      &lt;/listener&gt;
  </code></pre>
  
  <p>and this:</p>
  
  <pre><code>&lt;listener&gt;
          &lt;description&gt;Used to cleanup when a session is destroyed&lt;/description&gt;
          &lt;listener-class&gt;org.zkoss.zk.ui.http.HttpSessionListener&lt;/listener-class&gt;
      &lt;/listener&gt;
  </code></pre>