Tomcat8
web
Tomcat 在啓動過程當中加載衆多 jar 文件,默認會對其作 TLDs 掃描,{CATALINA-HOME}/logs/catalina.out 文件中會出現大量下面的 log:redis
09-Dec-2017 20:03:14.289 FINE [localhost-startStop-1] org.apache.jasper.servlet.TldScanner$TldScannerCallback.scan No TLD files were found in [file:/home/apache-tomcat-8.5.4/lib/tomcat-redis-session-manager-master-2.0.0.jar]. Consider adding the JAR to the tomcat.util.scan.StandardJarScanFilter.jarsToSkip property in CATALINA_BASE/conf/catalina.properties file.
出現這樣的log說明,這條log所指的 jar 作了TLDs的掃描,而且沒有在其中找到 TLDs,而且建議打開debug級別的log,查看相關的 jar 文件,在 Tomcat 配置文件中忽略對這樣的 jar 的TLDs掃描。
apache
1)編輯 {CATALINA-HOME}/conf/logging.properties 文件,在文件末尾添加:緩存
org.apache.jasper.servlet.TldScanner.level = FINE
2)重啓Tomcat。tomcat
3)等待Tomcat重啓完成,而且相關web components都加載完成,可以正常工做。bash
此時,在 {CATALINA-HOME}/logs/catalina.xxxx-xx-xx.log 文件中能看到相似下面的log:session
org.apache.catalina.webresources.Cache.getResource Unable to add the resource at [**] to the cache because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache
只要在$CATALINA_BASE/conf/context.xml裏增長資源最大可緩存的大小就好了,大小可按本身的須要定義:ide
<?xml version='1.0' encoding='utf-8'?> <Context> <WatchedResource>WEB-INF/web.xml</WatchedResource> <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource> <Resources cachingAllowed="true" cacheMaxSize="100000" /> </Context>
重啓tomcat
spa