HTML图片未在JSF模板中显示

  • 本文关键字:显示 JSF HTML html jsf-2.2
  • 更新时间 :
  • 英文 :


出于某种原因,图像etf.jpg不会出现,我真的认为这与URL无关。当我ctrl 单击Netbeans中的图像时,它显示了图片很好。它与插入标签有关吗?

!这是项目1

的文件组织
 <html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:h="http://xmlns.jcp.org/jsf/html"
  xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
  xmlns:p="http://primefaces.org/ui">
<h:head>
    <title>Facelet Title</title>
</h:head>
<style>
    div1{
        position: absolute;
        background-color: lightblue;
        font-family: arial;
        font-size: 75px;
        text-align: center;
        top: 0px;
        font-weight: bold;
        left: 0%;
        width: 100%;
        height: 17%;
        color: lightslategray;
    }
    div2{
        position: absolute;
        top: 20%;
        font-family: arial;
    }
    div3{
        background-color: red;
        font-family: arial;
        position: absolute;
        bottom: 0%;
        width: 100%;
        left: 0%;
        font-style: italic;
        font-weight: lighter;
        height: 15%;
        color: lightslategray;
        text-align: right;
    }
</style>
<h:body>
     <div1>
       <ui:insert name="header">
           <ui:include src = "header.xhtml"/>
       </ui:insert>
   </div1>
    <div2>
        <ui:insert name="content">
            <ui:include src ="defaultContent.xhtml"/>
        </ui:insert>
    </div2>
    <div3>
        <ui:insert name="footer">
            <img src="../img/etf.jpg"/>
            <div4><ui:include src = "contact.xhtml"/></div4>
        </ui:insert>
    </div3>
</h:body>

问题是模板在项目> Web>模板中,其他页面在项目> Web中。当在页面URL中包含模板时,它不再适合模板的URL。现在是与巫婆中的页面一起使用的URL使用模板。

最新更新