5arVukovic 5arVukovic - 3 months ago 13
HTML Question

html picture not showing in JSF template

For some reason image etf.jpg will not show up, and i really think it has nothing to do with URL. When I ctrl+ click on the image in NetBeans it showed the picture just fine. Does it have something to do with insert tags?

!This is file organisation of the project 1

<html xmlns="http://www.w3.org/1999/xhtml"
<title>Facelet Title</title>
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;
position: absolute;
top: 20%;
font-family: arial;
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;

<ui:insert name="header">
<ui:include src = "header.xhtml"/>
<ui:insert name="content">
<ui:include src ="defaultContent.xhtml"/>

<ui:insert name="footer">
<img src="../img/etf.jpg"/>
<div4><ui:include src = "contact.xhtml"/></div4>

Answer Source

The Problem was that templates were in Project>web>templates and other pages were in Project>web. When a template was included in a page url changes, and it i no longer url that is proper for the template. It is now url that works with the page in witch the template is used.