title: ClassNotFoundException with ServletContextlistener
body: <p>I get an exception whenever I try getting context parameter from <code>we.XML</code> into a <code>ServletContextListener</code> class, I am really having hard times understanding why It is not working,
  here's the exception in Apache Tomcat 7.0.11 log :</p>
  
  <pre><code> Oct 21, 2011 1:24:23 PM org.apache.catalina.core.StandardContext listenerStart
  SEVERE: Error configuring application listener of class alaa.ServletContextListener
  java.lang.ClassNotFoundException: alaa.ServletContextListener
  at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
  at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
  at   
     org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:415)
  at      
  
  at    org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:118)
  at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4618)
  at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5184)
  at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5179)
  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
  at java.util.concurrent.FutureTask.run(FutureTask.java:138)
  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
  at java.lang.Thread.run(Thread.java:662)
  </code></pre>
  
  <p>Here's a part of my web.xml :  </p>
  
  <pre><code> &lt;context-param&gt;
      &lt;param-name&gt;catName&lt;/param-name&gt;
      &lt;param-value&gt;meshmesh&lt;/param-value&gt;
  &lt;/context-param&gt;
  &lt;context-param&gt;
      &lt;param-name&gt;catBreed&lt;/param-name&gt;
      &lt;param-value&gt;egyptian&lt;/param-value&gt;
  &lt;/context-param&gt;  
  &lt;listener&gt;
     &lt;listener-class&gt;alaa.CatLisenter&lt;/listener-class&gt;
  &lt;/listener&gt;
  &lt;session-config&gt;
        &lt;session-timeout&gt;
          30
        &lt;/session-timeout&gt;
  &lt;/session-config&gt;
  </code></pre>
  
  <p>Here's my ServletContextListener.java: </p>
  
  <pre><code>package alaa;
  import javax.servlet.ServletContext;
  import javax.servlet.ServletContextEvent;
  import javax.servlet.ServletContextListener;
  public class CatLisenter implements ServletContextListener {
  
  @Override
  public void contextInitialized(ServletContextEvent sce) {
      ServletContext sc = sce.getServletContext();
      String name = sc.getInitParameter("catName");
  
      String breed = sc.getInitParameter("catBreed");
  
      Cat maCat = new Cat();
      maCat.setName(name);
      maCat.setBreed(breed);
  
      sc.setAttribute("cat", maCat);
  }
  
  @Override
  public void contextDestroyed(ServletContextEvent sce) {
      throw new UnsupportedOperationException("Not supported yet.");
  }   
  }
  
  
  
  Here's Cat.java : 
  
  
  
  
  
  package alaa;
  
  public class Cat {
  private String name;
  private String breed;
  
  
  public String getName() {
      return name;
  }
  
  public void setName(String name) {
      this.name = name;
  }
  
  public String getBreed() {
      return breed;
  }
  
  
  public void setBreed(String breed) {
      this.breed = breed;
  }
   }
  
  many thanks 
  </code></pre>