Adnan
Adnan

Reputation: 4607

Using servlet in h:graphicImage

I am having a servlet which is reading images from database, how can i run this servlet in h:graphicImage tag so that i can show images in the JSF page?

Upvotes: 1

Views: 1187

Answers (1)

BalusC
BalusC

Reputation: 1108722

Just specify an URL in the value attribute which matches the URL pattern of the servlet mapping. For example, if it is mapped on an URL pattern of /images/*, then just do so:

<h:graphicImage value="images/foo.png" />

Upvotes: 2

Related Questions