Intellij the JSP page in idea does not have access to static resources (image, JS, CSS)

Source: Internet
Author: User

Recently learning the Spring MVC framework. There are a lot of problems with IntelliJ idea compiler development because you don't understand the compiler configuration.

This is the main.jsp page in the picture label There is no one.jpg file in the issue.

All right... I can test the situation again but I still have a problem.

The situation was my main.jsp file under the JSP folder, the images folder and the JSP are sibling folders. Even if the path is entered ".. /images/one.jpg "is not allowed.

So I looked up a lot of blogs. Found this http://www.cnblogs.com/hhhd/p/6800325.html.

Spring MVC must be configured to support access to static resources. Idea default is the file path under Main/webapp, to be placed under the resource file of the Web-inf sibling, in the JSP

${pagecontext.request.contextpath} is added

Oh, I'm confused. I'll write again tomorrow ....

Intellij the JSP page in idea does not have access to static resources (image, JS, CSS)

Related Article

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.