部署web的时候,为了方便期间,把用户资源做一个link附加到应用中(ln -s /storage /opt/tomcat/webapps/ROOT/xxx),结果发现tomcat里的程序无法读取到这个目录或者里面的文件 例如:ServletActionContext.getServletContext().getRealPath('/storage')就输出为null,其他文件操作的地方,报java.io.FileNotFoundException. 原因是Tomcat下,默认是不支持linking的方式的,需要…