gpt4 book ai didi

html - Apache Tomcat 找不到外部 css 样式表

转载 作者:行者123 更新时间:2023-11-28 22:26:54 24 4
gpt4 key购买 nike

当使用 Apache Tomcat 时,它不会为我提供名为 CSS.css 的外部 CSS 样式表。这是其位置的图片:

It is in the webapp folder

当我尝试使用以下方法从 home.jsp 访问它时:

<link rel="stylesheet" href="${pageContext.request.contextPath}/CSS.css" type="text/css" >

没有任何反应。

此外,如果我转到浏览器并输入 localhost:8080/myappname/CSS.css,它仍然找不到它。

我对此进行了一段时间的研究,似乎一切都做对了。如果有人知道为什么这对我不起作用,那就太好了!

最佳答案

尝试将文件 CSS.css 重命名为 CSS1.css 并重新部署应用程序。
如果有效,则将 CSS1.css 重命名为 CSS.css

关于html - Apache Tomcat 找不到外部 css 样式表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40670033/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com