Eclipse Tomcat 8 警告: Unable to add the resource at [***] to the cache..

Recently when using Tomcat 8 in Eclipse I always get a lot of warnings like this:

警告: Unable to add the resource at [/WEB-INF/lib/springwebmvc-3.0.2.RELEASE.jar] to the cache because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache

  This kind of warning has never appeared in Tomcat 7. Referring to other articles, there are probably two solutions:
  one is like the warning above, increase the cache space, and find the storage directory of Tomcat, $CATALINA_BASE/conf/context. xml, for example, the directory of Tomcat on my computer is D:\Java\apache-tomcat-8.5.4, find the conf/context.xml configuration file in this directory, and add the following configuration to the context:

<Resources cachingAllowed="true" cacheMaxSize="100000" />

  The second method is to disable the cache, disable the cache, and add the following settings to the context tag:

<Resources cachingAllowed="false"/>

I modified it according to these two methods, but it didn't work well in Eclipse. There was no way, I deleted all Tomcat in the server, added it again, clicked Window->Preference->Server->Runtime Environment, you can see Eclipse All existing servers in

write picture description here

  Then re-import, click Add, select the version you want, find the local directory, select Tomcat, and then finish.
  The main point I want to say is, open the Server view in Eclipse, double-click the Tomcat we just added, and open its properties page.
  write picture description here
  There are three radio buttons at Server Locations. If you want your settings in the Tomcat directory to take effect, you must select the second item , which means that Eclipse uses Tomcat and its configuration directly instead of using the settings in the Eclipse workspace. . (For example, when I went to Eclipse to import a project that was synchronized with SVN, I accidentally chose Copy Projects to workspace. As a result, no matter what I changed, the SVN project did not change. The reason is very simple, this is the relationship between the original and the copy) .
  For problems encountered in upgrading from Tomcat 7 to Tomcat 8, you can refer to the official website documentation: http://tomcat.apache.org/migration-8.html#Web_application_resources
  Through the above method, these warnings have been eliminated.

 

Part of the content of this article is borrowed from https://blog.csdn.net/ww951993/article/details/71179149

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325180521&siteId=291194637