The first: copying the file to be accessed to a.txt tomcat webapps / installation path under ROOT folder: access path is: localhost: 8080 / a.txt or create a new folder in the webapps folder (test), b.txt file folder on the test: access path: localhost: 8080 / test / b.txt second: in the conf tomcat installation path /server.xml file, locate the host node element in the host node within the definition of a child node Context node, the node must define the docBase (of the actual file folder path: Example F: \ test) attributes, path (access virtual path: Example / test) properties, as follows <Context docBase = "F: \ test "path =" / t "> </ Context> access path: localhost: 8080 / T / C.txt access to the actual path to F: \ test \ c.txt file third: conf tomcat installation directory under / Engine found server.xml file node attribute specifies the name of the folder / defaultHost attribute name folder (conf / Catalina / localhost) d.xml a new file, in addition to the desired file xml file header label must also there Context labels, docBase must have properties as follows <?xml version='1.0' encoding='utf-8'?> <Context docBase="F:\test" ></Context> 访问路径:localhost:8080/d.txt