標簽:class blog style code div java tar ext art color log
默認情況下想通過在Tomcat下建立軟連接來使tomcat上的應用引用該資源是不行的。會出現類似錯誤:
java.lang.IllegalStateException: ContainerBase.addChild: start: LifecycleException: start: : java.io.IOException: Failed to access resource XXX
這時候需要打開支持引用軟連接資源的開關:allowLinking="true",
比如在context標簽下加入allowLinking="true":
<Context path="/XXX" override="true" allowLinking="true"> </Context>
或者在resources標簽下加入allowLinking="true",
<Resources className="xoxo" allowLinking="true"> </Resources >
讓Tomcat支持引用軟連接資源,布布扣,bubuko.com
標簽:class blog style code div java tar ext art color log
原文地址:http://www.cnblogs.com/mvii/p/tomcat_allowlinking.html