0

In my case I have two Java EE PrimeFaces applications A and B in a Apache Tomcat server:

Application A needs to display image from a repository contained in B ( let's call it (images/BLOBS/imageThatIWantToGet.png)

I tried to retrieve the absolute path and to give it to a p:graphicImage component like :

<p:graphicImage name="#{absoluteImagePath}"/>

but doesn't work. I tried also :

<img name="../../../B/images/BLOBS/;#{imageName}.png"/>

With no success too. Any Ideas ?

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Brahim LAMJAGUAR
  • 1,254
  • 5
  • 19
  • 28
  • 1
    I think you should create a ws to retrieve the image from project B. But if you need the image in project A as well, why not add it to this one? I mean, they're different projects. I don't see the need for this. Can you explain? – onzinsky Jun 03 '16 at 14:49
  • well in the first place project B was created with a repository images where there is a lot employees images ( in order of GB ) and there is a routine that updates just this repository, so I'm obliged to use this repository :/ – Brahim LAMJAGUAR Jun 03 '16 at 14:52
  • 1
    Ok! This is not your answer, but My opinion based on my experience tells me this is not the thing to do. If you have a common repository with images it shouldn't be inside any particular project. Don't you agree? – onzinsky Jun 03 '16 at 15:14
  • Yes I agree but I have no choice here :/ , but let's suppose that in the case of an external repository ( C:/SharedImagesRepository ) how to get the image to display it. – Brahim LAMJAGUAR Jun 03 '16 at 15:21
  • 1
    Finally the 3th option that BalusC proposed as answer in his link resolved the problem, there is an article where he explains it more in details : http://balusc.omnifaces.org/2007/04/imageservlet.html – Brahim LAMJAGUAR Jun 08 '16 at 14:55

0 Answers0