I am trying to figured out this situation. I would like to put an image name into html tag but i don’t know how to fill it. I am using Java Server Faces 2.0 .
here is sample of my code:
<img src="the\path\to\my\files\'#{manageBean.fileName}'" />
result of this :
<img src="the\path\to\my\files\'fileName.suffix' />
Not working : Image does not display !
Is there any better way which my brain missing ? Thanks to all for answer and suggestions.
There are a couple of things that I see.
#{managedBean.fileName}, so you can just leave them out.Lastly, you may want to take a look at the documentation for the
<h:graphicImage>tag. It may or may not be overkill for what you’re trying to do. There are lots of examples to be found out there, though.