You make a conceptual mistake. This is not a server that somehow includes and sends the image along with the generated HTML output. This is a web browser that loads an image at the URL specified in <img src>when it encounters a tag <img>in HTML.
, URL-, , -, . , -, .
" " . , . Tomcat <Context> server.xml
<Context docBase="/path/to/images" path="/images" />
Glassfish alternatedocroot glassfish-web.xml
<property name="alternatedocroot_1" value="from=/images/* dir=/path/to" />
. servletcontainer. URL-, , :
<p:graphicImage value="/images/#{image.imageName}" />
PrimeFaces StreamedContent API homegrowing .
. :