Omcat as a download server for HTTP, there are many ways online
But I think the simplest is:
1, directly put the file in the Tomcat6/webapps/root directory,
2, then access in the URL: http://192.168.2.31:8080/+ in the directory under the file name can be downloaded.
However, if you do not want to put under the webapps/root, you need to configure the directory you want to download: "Display the download directory directly on the Web page needs to click to download"
1, in the Tomcat installation directory \conf\catalina\localhost the creation of arbitrary file name XML file, such as: Download.xml,
The contents are as follows:
<?xml version= "1.0" encoding= "UTF-8"? ><context reloadable= "true" docbase= "D://download" crosscontext= "True" ></Context>
2. Configure Web. XML (Tomcat configuration file) to modify the following configuration:
<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>
To change the red false to true.
3. Restart Tomcat.
4. Visit http://19.168.23.31:8080/download
Tomcat implementation File open download function