解决方案 »

  1.   

    shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar可是 tomcat 启动的时候没有加载放进去的jar包。信息: Loading Spring root WebApplicationContext
    *sys-package-mgr*: processing new jar, 'D:\Tomcat\bin\bootstrap.jar'
    *sys-package-mgr*: processing new jar, 'D:\JDK\lib\tools.jar'
    *sys-package-mgr*: processing new jar, 'D:\JDK\jre\lib\resources.jar'
    *sys-package-mgr*: processing new jar, 'D:\JDK\jre\lib\rt.jar'
    *sys-package-mgr*: processing new jar, 'D:\JDK\jre\lib\jsse.jar'
    *sys-package-mgr*: processing new jar, 'D:\JDK\jre\lib\jce.jar'
    *sys-package-mgr*: processing new jar, 'D:\JDK\jre\lib\charsets.jar'
    *sys-package-mgr*: processing new jar, 'D:\JDK\jre\lib\ext\dnsns.jar'
    *sys-package-mgr*: processing new jar, 'D:\JDK\jre\lib\ext\localedata.jar'
    *sys-package-mgr*: processing new jar, 'D:\JDK\jre\lib\ext\sunjce_provider.jar'
    *sys-package-mgr*: processing new jar, 'D:\JDK\jre\lib\ext\sunmscapi.jar'
    *sys-package-mgr*: processing new jar, 'D:\JDK\jre\lib\ext\sunpkcs11.jar' (已经加载完公共的包,接下来开始加载应用中的包了)
    *sys-package-mgr*: processing new jar, 'D:\Tomcat\webapps\Groups\WEB-INF\lib\activation.jar'
    *sys-package-mgr*: processing new jar, 'D:\Tomcat\webapps\Groups\WEB-INF\lib\antlr-2.7.6.jar'
      

  2.   

    看看:http://sryqueblog.com/node/5
    Tomcat 6 shared loader woes
    Tue, 09/02/2008 - 00:36 in    * technologySo, I've installed Tomcat 6, since its the required verison of tomcat for the portal application that I'm installing. Not much different right? Wrong...sort of. Tomcat 6 now has a different configuration for the shared loader. In version 5.5, the directory structure for the shared loader was managed by Tomcat, and was located in $TOMCAT_HOME/shared/lib. Now this is specified by the user in he $TOMCAT_HOME/conf/catalina.properties file.The interesting thing is that it doesnt seem to work correctly. In 5.5, you could move all of the shared jars into the shared/lib and remove them from your apps and restart Tomcat. Voila! Less duplicate objecs! This was particularly handy when you have classes that are shared by many webapps and in my case, it prevents multiple caches from being created. This is where I'm stuck. I've added the /path/to/the/*.jar files in the shared.loader declaration in the catalina.properties file but after restarting, no worky.I'm still unsure why this is. It seems as if the classloader isnt loading the files correctly, of that the files arent getting loaded at all. Still searching...--UPDATE--After performing more testing, we found that due to the classloading behavior of Tomcat 6, utilizing the shared.loader for our purposes will not work. I believe that this has to do with the specific classes that are loaded and how the webapps utilize these classes, but I don't have hard evidence. The problem is that I've had to move on to more pressing issues and my questions about this will set on the shelf until I can get back to it.
      

  3.   

    按照 catalina.properties 的配置是可以的啊,LZ 再好好试试!