Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7681581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:22:27+00:00 2026-05-31T18:22:27+00:00

I have an image byte[] , this byte[] is coming from LDAP [Oracle Open

  • 0

I have an image byte[], this byte[] is coming from LDAP [Oracle Open LDAP Authentication Provider] and I need to show this image into the page.

How can I do this?

Can I use javax.faces.context.ResponseWriter to write the byte[] or I should extract an instance of java.io.OutputStream from the javax.faces.context.FacesContext and write the byte[] into page.

If any one of these methods is possible, then I can might be able to create a custom JSF tag, to display the image, and try to execute the image creation in encodeBegin(FacesContext context, UIComponent component) method of the javax.faces.render.Renderer, where the byte[] will be send as attribute.

Can I use Servlet for this purpose? Actually I don’t know whether or not I can call a Servlet from the source attribute of the af:image.

It will be very helpful to me if I get your suggestion.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T18:22:28+00:00Added an answer on May 31, 2026 at 6:22 pm

    I have an image byte[], this byte[] is coming from LDAP [Oracle Open LDAP Authentication Provider] and I need to show this image into the page.

    You need to think of this at the HTTP level. The page doesn’t contain the image (at least unless you’re going to embed the data directly, which is almost always a bad idea for non-tiny images). It contains a URL to the image.

    You should produce an img tag with an appropriate href which will allow you to fetch the data when the browser makes a request for it. That should almost certainly be a separate servlet, for simplicity – ideally responding to requests which include a “reasonable” filename (with a reasonable extension for the image).

    At that point you fetch the data for the image and write it not to a Writer but to an OutputStream for the response, as it’s binary data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 52 images that is coming from web URL.I want to display this
I have a web page where I need periodically update image based on several
I have been tackling this problem for some time. I get the image from
I have loaded an byte array image from a web service to my asp.net
I am saving a image into database with byte[] property like this: ProfileModel: private
I have an image that I'm rendering like this: glDrawPixels(image->width, image->height, GL_BGR, GL_UNSIGNED_BYTE, image->imageData);
I'm using ASP.NET MVC and have a model which has an image (byte array)
So I have Image like this (source: de-viz.ru ) I want to get something
So I have Image like this (source: de-viz.ru ) I want to get something
I'm creating an iPhone game and I need to load an image from a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.