【问题标题】:JBoss(WildFly) doesn't detect css files for index.htmlJBoss(WildFly) 没有检测到 index.html 的 css 文件
【发布时间】:2016-04-14 15:14:48
【问题描述】:

这是我的目录结构。

WebContent
    META-INF
    WEB-INF
    WebSites
        Index
            index.html
            css
                animate.css

web.xml 中,我将welcome-file 列表指定为>/WebSites/Index/index.html。 然后加载没有任何样式的html。 当我将 css 文件夹放在 WebContents 文件夹中时,样式会在 web.xml 中加载而没有任何修改。有什么办法可以解决这个问题吗?

【问题讨论】:

  • 能不能把index.html片段和css的声明放在一起?
  • 如果我把它改成 "./css/animate.css" 会解决吗??
  • 我尝试了“./css/animate.css”和“/Websites/Index/css/animate.css”但没有成功。

标签: html css jboss wildfly wildfly-9


【解决方案1】:

我使用了“/Test/WebSites/Index/css/animate.css”并且它有效(Test 是我的项目名称)。为了提供指向另一个页面的链接,我也遵循相同的格式。我不知道为什么,但这有效。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-01-31
    • 2014-09-18
    • 2015-05-02
    • 2014-10-04
    • 2019-02-12
    • 1970-01-01
    • 2021-07-09
    相关资源
    最近更新 更多