配置 tomcat/conf/server.xml 在 host 中增加如下 context
<Context path="/upload_file" docBase="/Users/xxx/developsoft/" reloadable="false" />
在 tomcat/conf/web.xml listings 项配置为 true (进行目录列表展示)
<servlet>
<servlet-name>default</servlet-name>
<servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>listings</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
网友评论