dev@jsftemplating.java.net

Re: JSFTemplating: Retrieving Images/media from database

From: paksegu <paksegu_at_yahoo.com>
Date: Wed, 28 Mar 2007 20:02:51 -0700 (PDT)

Okay thanks I will go ahead to read on the filestreamer docs and let you if I do have anymore questions. Please keep me posted when you blog on this.

Ken Paulsen <Ken.Paulsen_at_Sun.COM> wrote:
Hi,

Yes, you can do it just as you would with a normal JSF application if that's what you'd prefer to do.

JSFTemplating also provides a way to do this with it's "filestreamer" classes. So if you're not just serving up URL's to images (or other resources), but would like to serve the resources... you can do this with the filestreamer classes. Take a look at the JavaDoc for these classes which are in the "com.sun.jsftemplating.util.filestreamer" package.

Essentially, you'll need to create and register a "ContentSource". You'll specify your ContentSource which knows how to serve up resources the way you want by passing the "contentSourceId" parameter on the URL, or by making your contentSource the "default" content source. It will then allow you to stream just about any type of media from the server to the browser.

Perhaps I'll write a blog on this...

Let me know if you have questions,

Ken

paksegu wrote: Hi,
  I am a newbie to JSFTemplating and I would like to know how to go about retrieving images and media files from a database or a Repository such as JCR. Can I go about it just as I would use managebeans/methods in a regular JSF app.


Ransford Segu-Baffoe

paksegu_at_yahoo.com
paksegu_at_NoqturnalMediaSystems.com

http://www.noqturnalmediasystems.com/
http://www.noqturnalmediasystems.com/Serenade/
https://serenade.dev.java.net/
  
---------------------------------
  Now that's room service! Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.


Ransford Segu-Baffoe

paksegu_at_yahoo.com
paksegu_at_NoqturnalMediaSystems.com

http://www.noqturnalmediasystems.com/
http://www.noqturnalmediasystems.com/Serenade/
https://serenade.dev.java.net/
 
---------------------------------
Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.