First method: Use Tomcat to build a file server
1. Configure in the Tomcat directory
Put the file directly in the Tomcat6/webapps/root directory and then access it in the URL: Http://192.168.2.31:8080/download.zip can be downloaded.
2. Configure in other directories
If you don't want to put it under Webapps/root, configure the directory you want to download:
Create an arbitrary file name XML file under the Tomcat installation directory \conf\catalina\localhost, such as: Download.xml, as follows:
[HTML] View plaincopy<?xml version= "1.0" encoding= "UTF-8"?> <context path= "/download" docbase= "D://download" Crosscontext= "true" > </Context>
Modify the Tomcat configuration file, file directory \conf\web.xml, to change the red false to true.
<servlet> <servlet-name>default</servlet-name> <servlet-class>org.apache.catalina.servle Rsh Defaultservlet</servlet-class> <init-param> <param-name>debug</param-name> <param-value>0</param-value> </init-param> <init-param> <param-name>listi ngs</param-name> <param-value>false</param-value> </init-param> <load-on-sta Rtup>1</load-on-startup> </servlet>
Second way: Using Apache server
HTTP Server Setup