delegate true表示加载前先问上级loader,同java一般模式;false,先从本loader开始尝试加载

解决方案 »

  1.   

    delegate :     Set to true if you want the class loader to follow the standard Java2 delegation model, and attempt to load classes from parent class loaders before looking inside the web application. Set to false (the default) to have the class loader look inside the web application first, before asking parent class loaders to find requested classes or resources.
    http://tomcat.apache.org/tomcat-5.5-doc/config/loader.html
      

  2.   

     Loader对象可出现在Context中以控制Java类的加载。属性:delegate、含义:True代表使用正式的Java代理模式(先询问父类的加载器);false代表先在Web应用程序中寻找。默认值:FALSE
      

  3.   

    True,表示tomcat将遵循JVM的delegate机制,即一个WebAppClassLoader在加载类文件时,会先递交给SharedClassLoader加载,SharedClassLoader无法加载成功,会继续向自己的父类委托,一直到BootstarpClassLoader,如果都没有加载成功,则最后由WebAppClassLoader自己进行加载。
    False,表示将不遵循这个delegate机制,即WebAppClassLoader在加载类文件时,会优先自己尝试加载,如果加载失败,才会沿着继承链,依次委托父类加载。
    详细请查看:http://www.suiyiwen.com/question/4411