gpt4 book ai didi

java - CSS 未反射(reflect)在 Glassfish 4 中的 HTML 文件中

转载 作者:太空宇宙 更新时间:2023-11-04 11:58:26 25 4
gpt4 key购买 nike

我正在尝试在服务器上运行一个外部 HTML 文件。尽管给出的路径是正确的,但 CSS 没有得到反射(reflect)。我尝试将 CSS 文件夹放在 WebComponents 中,也放在 Web-Inf 中,但两次都没有用。

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../favicon.ico">

<title>Starter Template for Bootstrap</title>

<!-- Bootstrap core CSS -->
<link href="home/hduser/workspace/trial/WebContent/css/bootstrap.min.css" rel="stylesheet">

<!-- Custom styles for this template -->
<link href="home/hduser/workspace/trial/WebContent/css/starter-template.css" rel="stylesheet">
</head>

</html>

并且反复刷新页面或清理和刷新元素也没有帮助,这并没有反射(reflect)出对 HTML 的更改。

最佳答案

我也有同样的问题,这对我有用:

  1. 保存文件的所有更改。
  2. 在服务器上发布更改。我已经在使用 Eclipse Neon.1,您可以使用“发布”选项选择服务器,然后使用 Ctrl+Alt+P.

Capture of Publish option in Eclipse Neon.1

  1. 在服务器上运行您的元素,然后在您的网络浏览器中使用 Ctrl+F5

我希望这能帮助你和其他有同样问题的人,看到这个问题是一年前的。

关于java - CSS 未反射(reflect)在 Glassfish 4 中的 HTML 文件中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30018259/

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