It is rather easy, I usually have a download servlet for this
which generates the appropriate html code, I do not have the code handy 
currently
but you basically set the header mimetype to either your filetype or 
application/octed
stream, then pass down the content length (this is important because otherwise 
our all beloved IE
has some problems on certain filetypes)
and then you basically pass the stream as content down as embedded binary data.

You also can achieve that with a phaselistener if you feel uneasy to do it over
a separate servlet.

All you then have to do is to link to the servlet or phase listener with a linke
and a target="_new"

Werner


[EMAIL PROTECTED] wrote:
> I have nearly the same problem:
> 
> I have the link of a sample file (pdf, doc or something else) in the database.
> Now the user should have the possibility to open this file via a 
> CommandButton or CommandLink
> 
> I'm not quite sure, how I can do this?
> Thx for help
> 

Reply via email to