Writing to a file from a JSF managed bean
Hi,
I have a requirment where the jsf managed bean would receive a byte array from the business logic layer.
The byte array is actually an image file.
Now i need to write this byte array to a file in the server and display the image file in the JSF page
Please provide your valuable suggestions.
Thanks in advance,
James
# 1
Hi James,
Check these out, it could be useful in your case:
http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/fil e_upload.html
http://developers.sun.com/prodtech/javatools/jscreator/reference/code/sampleapp s/index.html#04
Databases (Queries): Retrieving Binary Data
This project demonstrates how a web application can upload binary files, such as image files, into a database so users can retrieve them for viewing.
http://developers.sun.com/prodtech/javatools/jscreator/reference/code/sampleapp s/popups/Demo_BLOB.html
HTH,
Sakthi