1. I use the tool tomcat7.0+myeclipse10.0.
2. Found in your Tomcat installation directory (my default installation is C drive) C:\Program Files\apache software Foundation\tomcat 7.0\conf\catalina\localhost, Create a new two XML file inside
3. A file named Root.xml is written inside
<?xml version= ' 1.0 ' encoding= ' utf-8 '?>
<context crosscontext= "true" docbase= "E:/upload" path= "" reloadable= "true" >
</Context>
Another file, named Upload.xml, is written inside.
<?xml version= ' 1.0 ' encoding= ' utf-8 '?>
<context crosscontext= "true" docbase= "E:/upload" path= "\upload" reloadable= "true" >
</Context>
(Note: Upload. The name of the XML is the name of the virtual path configured in your path, and the other is unchanged)
4. Restart the server to map to your local disk.
5. Add HTTP://LOCALHOST:8080/UPLOAD/3.JGP before reading.
JSP displays local pictures