Jump to content

Check out our Community Blogs

Register and join over 40,000 other developers!

Recent Status Updates

View All Updates

- - - - -

retrieve image from servlet in jsf


This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1 mutago


    CC Devotee

  • Senior Member
  • PipPipPipPipPipPip
  • 478 posts

Posted 27 December 2012 - 09:43 PM

I have servlets that displays image from database. Now i tried to display image in jsf but it does nothing.
i used the code below

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="http://www.w3.org/1999/xhtml"


<h1>Display Database Record in JSF</h1>

  <h:outputText value="Image" />

  <h:graphicImage value="DisplayPic?id='12'"/>



sQL Query looks like
"select image from pictures where id = '2'"

sQL Query looks like
"select image from pictures where id = '12'"

#2 Orjan


    CC Mentor

  • Moderator
  • 2918 posts

Posted 27 December 2012 - 11:01 PM

what's your code in DisplayPic ?

I'm a System developer at XLENT Consultant Group mainly working with SugarCRM.
Please DO NOT send mail or PM to me with programming questions, post them in the appropriate forum instead, where I and others can answer you.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download