After migrating to tomcat 8 aliases doesn't work any more

限于喜欢 提交于 2019-12-02 02:35:57

I have found a solution. Problem was in context.xml.

To make alias work on tomcat 8 here is required change in context.xml:

<Context reloadable="true" >
    <Resources>
       <PreResources base="C://dir1" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/d1" />
       <PreResources base="C://temp//dir2//" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/d2" />
       <PreResources base="C://temp//dir3//" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/d3" />
   </Resources>
   <Valve className="org.apache.catalina.valves.RemoteAddrValve"  allow=".*" />
</Context>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!