建立软连接的目的是隔离tomcat里目录或文件,主要是隔离webapps里的项目或者静态资源文件,以实现部署和维护的方便。在tomcat里context.xml文件里设置allowLinking=”true”就可以打开软连接,根据tomcat版本不同有不同的设置:
tomcat567版本:
<Context allowLinking="true">
......
</Context>
tomcat89版本:
<Context>
<Resources allowLinking="true" />
</Context>