What should I do if I cannot display the 404 error when I introduce the img label of the js file in jsp ?, Js404

Source: Internet
Author: User

What should I do if I cannot display the 404 error when I introduce the img label of the js file in jsp ?, Js404

Today, I encountered a problem. I started a web project and put an img tag on a jsp page. However, the image cannot be displayed, and the Error 404 is reported all the time. I swear to God that the path is absolutely correct. After a long time, finally find out the problem, in the sping-mvc.xml configuration file less write a line of code. "" Lines of code are missing. With spring, the default Servlet is used to respond to static files. (when the DefaultServletHttpRequestHandler is started in the container, the default servlet Name List of mainstream web containers is used to automatically find the default servlet of the container. Otherwise, the system will not respond to static files and will always report 404. I hope it will help you!

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.