Put the JSP file under Web-inf, can not find the referenced JS file solution __jsp

Source: Internet
Author: User

Reference JS file encountered a very easy to make a mistake, recorded here, the original address: http://blog.sina.com.cn/s/blog_4550f3ca0100ordw.html:

In the Web-lib file refers to the JS file, the path or relative to the webroot, so can not and the current file path as a comparison, should be webroot as the current path of the file, such as a JSP file in the Web-inf JSP folder, When the JS file, you should put the JS file under the folder under the Webroot, so in the Webroot folder to build a JS folder, will refer to the JS file, such as Jquery.js file Introduction, then in the introduction should write SRC for js/ Jquery.jsp.

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.