title: ServletContextListener.contextInitialized doesnt get called when context is initialised
body: <p>I am creating a war file (progressReporter.war) and i am deploying it on Jetty7.2.2.v20101205. I have a sysout on contextInitialized method which i should see when jetty starts up. I am starting jetty using<br>
  java -jar start.jar  </p>
  
  <p>Java version is 1.6  </p>
  
  <p>Same thing when i am running on tomcat, its running absolutely fine. For jetty i have included   </p>
  
  <ul>
  <li>jetty-client-7.2.2.v20101205.jar  </li>
  <li>jetty-continuation-7.2.2.v20101205.jar  </li>
  <li>jetty-http-7.2.2.v20101205.jar  </li>
  <li>jetty-io-7.2.2.v20101205.jar  </li>
  <li>jetty-servlets-7.2.2.v20101205.jar  </li>
  <li>jetty-util-7.2.2.v20101205.jar  </li>
  </ul>
  
  <p>Following is what i have in  </p>
  
  <pre><code>@Override  
  public void contextInitialized(ServletContextEvent servletContextEvent) {  
      ApplicationContext applicationContext = new ClassPathXmlApplicationContext(new String[] {"spring-http-config.xml", "test-spring-http-config.xml", "spring-ibatis.xml" });  
      System.out.println("setting attribute now ............... " + servletContextEvent.getServletContext());  
  }  
  </code></pre>
  
  <p>Following is what i have in web.xml</p>
  
  <pre><code>&lt;listener&gt;  
      &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener  
      &lt;/listener-class&gt;  
      &lt;listener-class&gt;com.client.BatchProgressorContextListener  
     &lt;/listener-class&gt;  
  &lt;/listener&gt;
  </code></pre>
  
  <p>Can you please help me what's going wrong here?  </p>
  
  <p>Following is the output when i start jetty:  </p>
  
  <pre><code>C:\bkup\trialLearning\jetty&gt;java -jar start.jar
  2011-01-01 20:04:10.510:INFO::jetty-7.2.2.v20101205
  2011-01-01 20:04:10.525:INFO::Deployment monitor C:\bkup\trialLearning\jetty\web
  apps at interval 1
  2011-01-01 20:04:10.525:INFO::Deployable added: C:\bkup\trialLearning\jetty\weba
  pps\progressReporter.war
  2011-01-01 20:04:10.666:INFO::Copying WEB-INF/lib jar:file:/C:/bkup/trialLearnin
  g/jetty/webapps/progressReporter.war!/WEB-INF/lib/ to C:\Documents and Settings\
  i143628\Local Settings\Temp\jetty-0.0.0.0-8080-progressReporter.war-_progressRep
  orter-any-\webinf\WEB-INF\lib
  2011-01-01 20:04:12.213:INFO:progressReporter:Initializing Spring root WebApplic
  ationContext
  0    [main] INFO  org.springframework.web.context.ContextLoader  - Root WebAppli
  cationContext: initialization started
  31   [main] INFO  org.springframework.web.context.support.XmlWebApplicationConte
  xt  - Refreshing Root WebApplicationContext: startup date [Sat Jan 01 20:04:12 I
  ST 2011]; root of context hierarchy
  93   [main] INFO  org.springframework.beans.factory.xml.XmlBeanDefinitionReader
   - Loading XML bean definitions from class path resource [spring-http-config.xml
  ]
  203  [main] INFO  org.springframework.beans.factory.xml.XmlBeanDefinitionReader
   - Loading XML bean definitions from class path resource [test-spring-http-confi
  g.xml]
  218  [main] INFO  org.springframework.beans.factory.xml.XmlBeanDefinitionReader
   - Loading XML bean definitions from class path resource [spring-ibatis.xml]
  390  [main] INFO  org.springframework.beans.factory.config.PropertyPlaceholderCo
  nfigurer  - Loading properties file from class path resource [qpr-config.propert
  ies]
  406  [main] INFO  org.springframework.beans.factory.support.DefaultListableBeanF
  actory  - Pre-instantiating singletons in org.springframework.beans.factory.supp
  ort.DefaultListableBeanFactory@e66f56: defining beans [org.springframework.conte
  xt.annotation.internalConfigurationAnnotationProcessor,org.springframework.conte
  xt.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.a
  nnotation.internalRequiredAnnotationProcessor,org.springframework.context.annota
  tion.internalCommonAnnotationProcessor,batchProgressUpdater,batchProgressMetrics
  ,progressReporterResultsQueue,cbbEventProcessorThread,timerEventProcessorThread,
  eventThreadManager,eventListener,metricsAggregator,southbeachDummyClient,cbbPric
  er,dummyCbb,processorThread,counterGenerater,imntInfoDao,imntStatsInfoDao,org.sp
  ringframework.beans.factory.config.PropertyPlaceholderConfigurer#0,dataSource,sq
  lMapClient]; root of factory hierarchy
  593  [main] INFO  org.springframework.web.context.ContextLoader  - Root WebAppli
  cationContext: initialization completed in 593 ms
  2011-01-01 20:04:12.947:INFO::Deployment monitor C:\bkup\trialLearning\jetty\con
  texts at interval 1
  2011-01-01 20:04:12.947:INFO::Deployable added: C:\bkup\trialLearning\jetty\cont
  exts\test.xml
  2011-01-01 20:04:12.978:INFO::Extract jar:file:/C:/bkup/trialLearning/jetty/weba
  pps/test.war!/ to C:\Documents and Settings\i143628\Local Settings\Temp\jetty-0.
  0.0.0-8080-test.war-_-any-\webapp
  2011-01-01 20:04:13.572:INFO:org.eclipse.jetty.servlets.TransparentProxy:Transpa
  rentProxy @ /javadoc to http://download.eclipse.org/jetty/stable-7/apidocs
  2011-01-01 20:04:13.572:INFO::Deployable added: C:\bkup\trialLearning\jetty\cont
  exts\javadoc.xml
  2011-01-01 20:04:13.588:INFO::Started SelectChannelConnector@0.0.0.0:8080
  2011-01-01 20:12:59.369:INFO::Graceful shutdown SelectChannelConnector@0.0.0.0:8
  080
  2011-01-01 20:12:59.447:INFO::Graceful shutdown o.e.j.w.WebAppContext{/progressR
  eporter,[file:/C:/Documents%20and%20Settings/i143628/Local%20Settings/Temp/jetty
  -0.0.0.0-8080-progressReporter.war-_progressReporter-any-/webinf/, jar:file:/C:/
  bkup/trialLearning/jetty/webapps/progressReporter.war!/]},C:\bkup\trialLearning\
  jetty\webapps\progressReporter.war
  2011-01-01 20:12:59.447:INFO::Graceful shutdown o.e.j.w.WebAppContext{/,file:/C:
  /Documents%20and%20Settings/i143628/Local%20Settings/Temp/jetty-0.0.0.0-8080-tes
  t.war-_-any-/webapp/},C:\bkup\trialLearning\jetty/webapps/test.war
  2011-01-01 20:12:59.478:INFO::Graceful shutdown o.e.j.s.h.ContextHandler{/javado
  c,file:/C:/bkup/trialLearning/jetty/javadoc}
  2011-01-01 20:13:00.666:INFO:progressReporter:Closing Spring root WebApplication
  Context
  528453 [Thread-1] INFO  org.springframework.web.context.support.XmlWebApplicatio
  nContext  - Closing Root WebApplicationContext: startup date [Sat Jan 01 20:04:1
  2 IST 2011]; root of context hierarchy
  528453 [Thread-1] INFO  org.springframework.beans.factory.support.DefaultListabl
  eBeanFactory  - Destroying singletons in org.springframework.beans.factory.suppo
  rt.DefaultListableBeanFactory@e66f56: defining beans [org.springframework.contex
  t.annotation.internalConfigurationAnnotationProcessor,org.springframework.contex
  t.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.an
  notation.internalRequiredAnnotationProcessor,org.springframework.context.annotat
  ion.internalCommonAnnotationProcessor,batchProgressUpdater,batchProgressMetrics,
  progressReporterResultsQueue,cbbEventProcessorThread,timerEventProcessorThread,e
  ventThreadManager,eventListener,metricsAggregator,southbeachDummyClient,cbbPrice
  r,dummyCbb,processorThread,counterGenerater,imntInfoDao,imntStatsInfoDao,org.spr
  ingframework.beans.factory.config.PropertyPlaceholderConfigurer#0,dataSource,sql
  MapClient]; root of factory hierarchy
  </code></pre>
  
  <p>Can you please help me as to what i am doing wrong and what needs to be done to run on Jetty please? 
  Please do let me know if you need any other details as well.</p>
  
  <p>Thanks in advance.</p>