File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Display blob image to JSF (using ADF BC) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Display blob image to JSF (using ADF BC) " Watch "Display blob image to JSF (using ADF BC) " New topic

Display blob image to JSF (using ADF BC)

Susan Monz

Joined: Aug 23, 2008
Posts: 27
I am new to ADF BC and JSF (IDE - JDevloper 10.1.3). Before this i worked on J2ee with JSFs, JAvascripts, EJBs .... Before i could actually master that I moved into this project which requires ADF BC .
My first assignment itself is a toughie. HAve to upload an image(Jpeg ) into the database via JSF +ADF BC and then display this photo on the user profile page when i submit the user details.(I think they have a component called blobdomain that converts this data type to the blob data type of oracleand visa versa).
So i have two things to do
1. Have my application let me upload photos of users into the database
2. Display the user's photo when I have to display all his details ( which are in another table, these two tables are matched by user id).

Can anyone please tell me how i can achieve this.
Please. I am very much new to all this and i want to learn.

Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46397
Welcome to JavaRanch.

I am afraid you have come to the wrong forum; this is not an IDE related question, and will probably have to be moved.

Jesper: suggest this might be a JDBC question.

And please go to "my private messages" for an important administrative message.

Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

Well, it isn't really a JDBC question as such. But that's because it's really a long list of questions. Let's go through what I think is the list:

1. How do I upload files using JSF?

Well, I don't know. That's a JSF question. If JSF doesn't have that as a built-in feature then I would recommend using the Apache Commons FileUpload package.

2. Once I have the file upload, how do I put it into a blob in my database?

You seem to think that JSF and ADF have this covered. I don't know anything about that. And there isn't much point in going into detail about JDBC if they already do, so I won't.

3. How do I display one of these blobs?

That's a JSF question, too. Normally you would just provide a URL with a parameter identifying how to get the blob from the database, and write a servlet which streams the data from the blob back to the response's output stream. It would use JDBC to get the blob data if JSF didn't already have that sort of thing built in. Which I don't know if it does or not.
I agree. Here's the link:
subject: Display blob image to JSF (using ADF BC)
It's not a secret anymore!