日期:2014-05-19  浏览次数:20777 次

<Loader delegate="true"/>的作用?
配置的工程中说spring的ApplicationContext.xml找不到、。。。
在tomcat的contex.xml中添加<Loader delegate="true"/> 
就OK了。 
这句话的是什么意思啊?

------解决方案--------------------
delegate true表示加载前先问上级loader,同java一般模式;false,先从本loader开始尝试加载
------解决方案--------------------
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
------解决方案--------------------
 Loader对象可出现在Context中以控制Java类的加载。属性:delegate、含义:True代表使用正式的Java代理模式(先询问父类的加载器);false代表先在Web应用程序中寻找。默认值:FALSE