我在这个目录中有一个css文件:
D:\JavaProjects\MyGuessNumber\web\resources\css\bootstrap.css
在我的 index.xhtml 文件中,我有:
<h:outputStylesheet library="css" name="bootstrap.css" />
当我运行此应用程序时:
localhost:8080/MyGuessNumber
css 文件加载得很好。
当我使用:
http://localhost:8080/MyGuessNumber/faces/index.xhtml
CSS仍然存在。
但是当我这样做时:
http://localhost:8080/MyGuessNumber/index.xhtml
页面加载,但没有CSS?我怎样才能使这项工作?
编辑:我正在使用:/faces/*