This is what the code looks like:
<h:dataTable value="#{movie.movieItems}" var="item" border="0" cellpadding="2" cellspacing="0" rowClasses="jsfcrud_odd_row,jsfcrud_even_row" rules="all" style="border:solid 1px">
<h:column>
<f:facet name="header">
<h:outputText value="Cover"/>
</f:facet>
<h:graphicImage value="../includes/images/#{item.cover}" styleClass="covers"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Nanme"/>
</f:facet>
<h:outputText value="#{item.name}" styleClass="info"/>
</h:column>
Since the image URL does not start with a scheme or
/, it becomes relative to the current request URL (the one which appears in browser address bar). In the page where it’s not working, the page itself is apparently called by an extra path in the URL. It will make the image unreachable.You need to make it absolute by using the full URL or relative to the domain by starting with
/. I’d suggest the latter approach. Assuming that the webapp runs on http://example.com/appname and that the image is available by http://example.com/appname/includes/images/name.ext, then the following should do. The<h:graphicImage>already takes the context path into account.