While writing this post, I managed to fix my own problem with help from
the internet. The solution is for anyone running tomcat v 9.0 inside
eclipse.
Tomcat v9.0 in eclipse gave me a large number of cache warning errors
and eventually crashed. While verifying the problem, I discovered a fix
discussed at the following url:
https://stackoverflow.com/questions/14771710/how-to-solve-javax-servlet-servletexception-java-lang-unsupportedclassversioner
That site recommended adding the following line to the tomcat path
.../config/context.xml.
|<Resources cachingAllowed="true" cacheMaxSize="100000" /> I added that
line to context.xml and after several iterations of trying, the |||cacheMaxSize value was 600000 (i.e. 600M-bytes in size). The website I
am working on only contains 22 M-bytes so cache size should not have
been an issue, but the warnings kept coming. Then I thought, maybe
Eclipse has its own version of tomcat 9.0 and sure enough I found there
is a tomcat v 9.0 sub-directory in eclipse/workspace/Servers directory.
I added the 'Resources' line shown above to the the conf/context.xml
file in the eclipse tomcat v 9.0 sub-directory and that fixed my
problem. |So the 2 step fix for cache error messages is: 1) locate the
correct version of tomcat in your eclipse workspace 2) add "|||<Resources cachingAllowed="true" cacheMaxSize="100000" />" to your
context.xml file. I will update the stackoverflow.com URL with a
comment. I'm not sure if this is worth mentioning anywhere in the tomcat
documentation. I will leave that to others.||
--
Jim Anderson