异常可能被抛出了,你catch一下看看。

解决方案 »

  1.   

    在标签类中异常跑步出来,不知道怎么搞得。最后问题锁定SpringContextUtil这个类,用它的什么方法都会抛
    异常。但是SpringContextUtil这个类有什么问题呢?我在ContextLoaderListener已经把它这样了:
    public void contextInitialized(ServletContextEvent event) {

    super.contextInitialized(event);   
      
            ServletContext context = event.getServletContext();   
      
            ApplicationContext ctx = WebApplicationContextUtils   
                    .getRequiredWebApplicationContext(context);   
            SpringContextUtil.setApplicationContext(ctx);    String contextName = context.getServletContextName();   
            log.info("eapf::: contextName==>"+contextName);   
               
            String realpath = context.getRealPath("/");   
            log.info("eapf:::realpath==>"+realpath);   
      
            String serverInfo = context.getServerInfo();   
            log.info("eapf:::serverInfo==>"+serverInfo);   
      
            SpringContextUtil.setContextName(contextName);   
            SpringContextUtil.setRealPath(realpath);   
            SpringContextUtil.setServerInfo(serverInfo);    }
    debug时上面的也没问题呀,为什么SpringContextUtil就是用不成?真搞不懂!!!
      

  2.   

    我也遇到这样的问题,看一下你的SpringContextUtil是怎么写的???