论坛首页 Java企业应用论坛

hibernateFilter 配置问题

浏览 1445 次
该帖已经被评为隐藏帖
作者 正文
   发表时间:2008-06-23  
  <filter>
    <filter-name>UserValidateFilter</filter-name>
    <filter-class>com.fuhe.yjh1104.util.UserValidateFilter</filter-class>
       </filter>
  <filter>
  <filter-name>hibernateFilter</filter-name>
     <filter-class>
      org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
     </filter-class>
  </filter>
 
  <filter-mapping>
    <filter-name>UserValidateFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>
  <filter-mapping>
  <filter-name>hibernateFilter</filter-name>
     <url-pattern>*.do</url-pattern> 
  </filter-mapping> 
  <listener>
    <listener-class>com.fuhe.yjh1104.framework.ContextStartListener</listener-class>
  </listener>
  <listener>
    <listener-class>com.fuhe.yjh1104.util.SessionCounter</listener-class>
  </listener>
在没有配置hibernateFilter 的时候这个配置是正确的,配置了之后就出现找不到listner ContextStartListener 了
出现了这个异常
java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered?

这个listner 也相当的简单,就是找不到了,郁闷得很
package com.fuhe.yjh1104.framework;

import javax.*;

public class ContextStartListener extends HttpServlet implements ServletContextListener {

public void contextInitialized(ServletContextEvent arg0) {
System.out.println("监听服务启动");
new TimeThread().start();

}

public void contextDestroyed(ServletContextEvent arg0) {
// TODO Auto-generated method stub

}

}

请问各位高手这个是怎么回事啊?
论坛首页 Java企业应用版

跳转论坛:
Global site tag (gtag.js) - Google Analytics