Springモニタ機能

1362 ワード

<!--   Spring ApplicationContext -->
  <listener>
  	<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>
 Contect Loader Listenerの役割は、Web容器を起動する際に、springのAppplication Conteetを自動的に組み立てる構成情報です.
 
<listener>  
   <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>  
</listener>
 公式文書:
If you use a Servlet 2.4+web container、with requests processed outside of Spring's Dispring Servlet(for example、when using JSF or Struts)、you need to add the follwingjavax.servlet.ServletRequestListenerto the declearsウェブサイト
<web-app>
...
<listener>
  <listener-class>
      org.springframework.web.context.request.RequestContextListener
  </listener-class>
</listener>
...
</web-app>
Servlet 2.4以上のwebコンテナを使用する場合、SpringのDispactch Servlet以外の処理を要求する(例えば、JSFまたはStrutsを使用する場合、以下のjavax.servlet.Servlect.Servrequest Listenerの声明がweb.xmlファイルに追加されます.