I added it this way. Is it correct?
<Context allowMultipleLeadingForwardSlashInPath="true" containerSciFilter="org.apache.jasper.servlet.JasperInitializer">
<JarScanner>
<JarScanFilter defaultTldScan="false"/>
</JarScanner>
<!-- We need to set the resource cache size since the default (10K) is too small for loading all XWiki resources at
once -->
<Resources cacheMaxSize="50176" />
</Context>
If the code is correct, then this did not help, as thumbnails are still not shown.