EL expression should do the work:
<h:graphicImage id="image"
alt="image"
url="/DownloadBinaryServlet?id=#{groupBox.getImageId()}">
</h:graphicImage>
En l'instant précis du 02/19/07 11:51, madan chowdary s'exprimait en ces
termes:
> Hi All,
>
> I have a situation that i need to invoke a servlet which is used to
> write a image to the page.
>
> The image will be retrieved from the database as blob object and then
> converted to byte[].
>
> now i need to display this image in my page.
>
> This could probably done with help of a servlet.
>
> i need to invoke a servlet with a URL which has an id appened to that URL.
>
> The ordinary JSP code looks like this,
>
> <IMG src="DownloadBinaryServlet?id=<%=groupBox.getImageId()%>
>
> The servlet code is as such
>
> OutputStream out = response.getOutputStream();
> out.write( groupBox.getImageBytes() );
> out.close();
>
> But this piece of code does not work in Tobago pages, as <% %>
> scriplets are not allowed.
>
> I need to frame the URL with value ID set to the parameter as above
> and invoke the servlet .
>
> How can i achieve this task .. Any suggestions ?
>
> Thnx in advance
>
> Regards
> Madan
>
>
>
> ------------------------------------------------------------------------
> Here’s a new way to find what you're looking for - Yahoo! Answers
> <http://us.rd.yahoo.com/mail/in/yanswers/*http://in.answers.yahoo.com/>