Bishi: The digital platform of University examination Information (iv)--web-inf internal JSP file reference CSS

Source: Internet
Author: User

First look at the directory structure:


Previously mentioned in the Web. XML configuration, but here admin_index.jsp still can't reference

<link rel= "stylesheet" type= "Text/css" href= ". /.. /css/bootstrap.min.css ">

Or

<link rel= "stylesheet" type= "Text/css" href= "/css/bootstrap.min.css" >

The path can be written by Ctrl + Left to open the corresponding file, but the style will not appear.

After the https://www.cnblogs.com/x_wukong/p/3969114.html mentioned:

The Web-inf layer directory can be ignored when a file accesses a resource file in the Web-inf directory.

Therefore, the correct path to referencing the CSS in admin_index.jsp should be:

<link rel= "stylesheet" type= "Text/css" href= ". /css/bootstrap.min.css ">

CTRL + Left button cannot be opened, but the style appears.

Also, I don't understand if I can't reference it from the root directory.

Bishi: The digital platform of University examination Information (iv)--web-inf internal JSP file reference CSS

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.