I have a directory to which a process uploads some .pdf files. This process is out of my control.
I need to make those files available through the websi
There are 4 places where Context can live.
In case of tomcat 8 allowlinking attribute should be specified not in Context but in Resources tag. My tomcatdir/conf/context.xml looks like this
WEB-INF/web.xml
${catalina.base}/conf/web.xml
This solution works fine for me now. But I want to share also the mistake I had done before coming to this solution.
I had defined Resources both in tomcatdir/conf/server.xml and in tomcatdir/conf/context.xml. And allowLinking="true" was set only in tomcatdir/conf/server.xml.
What I found was that if you do not specify allowLinking it is equal to setting it to false. So I removed Resources tag from server.xml and left it only tomcatdir/conf/context.xml with the allowLinking="true" attribute in it.