Tomcat中配置Url直接访问本地其他磁盘

在配置 Tomcat serserver.xml 中配置
 <Context path="/image" docBase="E:\image" debug="0" reloadable="true"></Context> 
这个就是访问目录 ,可以直接访问  http://localhost:8080/image/ 

 

 <Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">
    
      <!-- 下面这个就是访问目录 ,可以直接访问 http://localhost:8080/image/ --> <Context path="/image" docBase="E:\image" debug="0" reloadable="true"></Context> <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t &quot;%r&quot; %s %b" prefix="localhost_access_log." suffix=".txt"/> </Host>

 

posted @ 2018-05-25 14:11  低调人生  阅读(1985)  评论(0)    收藏  举报