JSP displays local pictures

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.