You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "Nutulapati, Krishna" <KN...@ussco.com> on 2008/09/17 19:49:54 UTC

how to download a file using JSF

Hello All,
Can any one help me on how to  download a file into client system using
JSF. 
Soon after user clicks on download button on the webpage, some thing
like   File Chooser papers,user selects the file and clicks the save
button. 
File should be saved into the client system at specified location. Any
samples or examples with JSF/Backing Bean  would be very helpful. 
 
Environment:- JSF, SPRING , WEBSPHERE 6.1 RAD 7.0
 
Thanks
Krishna
 
 
 
 
 

Re: how to download a file using JSF

Posted by Matthias Wessendorf <ma...@apache.org>.
On Wed, Sep 17, 2008 at 11:59 PM, Karel Zacek <za...@lightcomp.cz> wrote:
> Hi
>
> If you want to download file not accessible via link try following
> http://wiki.apache.org/myfaces/Sending_Files

Trinidad has a special (and easy to use) actionListener for this already

-M

>
> Karel
>
> Nutulapati, Krishna wrote:
>>
>> Hello All,
>> Can any one help me on how to  download a file into client system using
>> JSF.
>> Soon after user clicks on download button on the webpage, some thing like
>>   File Chooser papers,user selects the file and clicks the save button.
>> File should be saved into the client system at specified location. Any
>>  samples or examples with JSF/Backing Bean  would be very helpful.
>>  Environment:- JSF, SPRING , WEBSPHERE 6.1 RAD 7.0
>>  Thanks
>> Krishna
>>
>
>



-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf

RE: how to download a file using JSF

Posted by "Nutulapati, Krishna" <KN...@ussco.com>.
 The info in the link is helpful. 
Can I know have how the jsf code would be. Is it just calling the method
in the backing bean.
Does just calling the method in the backing bean from JSF ,will return
whole outputStream to the user?
I prefer this approach if possible, as oppose to maintaining the file in
the server. 
Thanks
Krishna
 


-----Original Message-----
From: Karel Zacek [mailto:zacek@lightcomp.cz] 
Sent: Thursday, September 18, 2008 1:59 AM
To: MyFaces Discussion
Subject: Re: how to download a file using JSF

Hi

If you want to download file not accessible via link try following
http://wiki.apache.org/myfaces/Sending_Files

Karel

Nutulapati, Krishna wrote:
> Hello All,
> Can any one help me on how to  download a file into client system 
> using JSF.
> Soon after user clicks on download button on the webpage, some thing 
> like   File Chooser papers,user selects the file and clicks the save 
> button.
> File should be saved into the client system at specified location. Any

> samples or examples with JSF/Backing Bean  would be very helpful.
>  
> Environment:- JSF, SPRING , WEBSPHERE 6.1 RAD 7.0
>  
> Thanks
> Krishna
>  
>  
>  
>  
>  


Re: how to download a file using JSF

Posted by Karel Zacek <za...@lightcomp.cz>.
Hi

If you want to download file not accessible via link try following
http://wiki.apache.org/myfaces/Sending_Files

Karel

Nutulapati, Krishna wrote:
> Hello All,
> Can any one help me on how to  download a file into client system 
> using JSF.
> Soon after user clicks on download button on the webpage, some thing 
> like   File Chooser papers,user selects the file and clicks the save 
> button.
> File should be saved into the client system at specified location. Any 
>  samples or examples with JSF/Backing Bean  would be very helpful.
>  
> Environment:- JSF, SPRING , WEBSPHERE 6.1 RAD 7.0
>  
> Thanks
> Krishna
>  
>  
>  
>  
>  


Re: how to download a file using JSF

Posted by Jim the Standing Bear <st...@gmail.com>.
I must be drunk... not sure why i said "thank you" when I meant to say
"if you"...

On Wed, Sep 17, 2008 at 2:35 PM, Jim the Standing Bear
<st...@gmail.com> wrote:
> Isn't it a behavior of the browser? thank you provide a URL, whether
> be it from a static HTML page or a page generated by JSF, the browser
> will automatically try to download the file?  am I missing something
> here?
>
> On Wed, Sep 17, 2008 at 1:54 PM, Nutulapati, Krishna
> <KN...@ussco.com> wrote:
>> Hello All,
>> Can any one help me on how to  download a file into client system using JSF.
>> Soon after user clicks on download button on the webpage, some thing
>> like   File Chooser appears,user selects the file and clicks the save
>> button.
>> File should be saved into the client system at specified location. Any
>>  samples or examples with JSF/Backing Bean  would be very helpful.
>>
>> Environment:- JSF, SPRING , WEBSPHERE 6.1 RAD 7.0
>>
>> Thanks
>> Krishna
>> ________________________________
>> From: Nutulapati, Krishna [mailto:KNutulapati@ussco.com]
>> Sent: Wednesday, September 17, 2008 12:50 PM
>> To: MyFaces Discussion
>> Subject: how to download a file using JSF
>>
>> Hello All,
>> Can any one help me on how to  download a file into client system using JSF.
>> Soon after user clicks on download button on the webpage, some thing
>> like   File Chooser papers,user selects the file and clicks the save button.
>> File should be saved into the client system at specified location. Any
>>  samples or examples with JSF/Backing Bean  would be very helpful.
>>
>> Environment:- JSF, SPRING , WEBSPHERE 6.1 RAD 7.0
>>
>> Thanks
>> Krishna
>>
>>
>>
>>
>>
>
>
>
> --
> --------------------------------------
> Standing Bear Has Spoken
> --------------------------------------
>



-- 
--------------------------------------
Standing Bear Has Spoken
--------------------------------------

Re: how to download a file using JSF

Posted by Jim the Standing Bear <st...@gmail.com>.
Isn't it a behavior of the browser? thank you provide a URL, whether
be it from a static HTML page or a page generated by JSF, the browser
will automatically try to download the file?  am I missing something
here?

On Wed, Sep 17, 2008 at 1:54 PM, Nutulapati, Krishna
<KN...@ussco.com> wrote:
> Hello All,
> Can any one help me on how to  download a file into client system using JSF.
> Soon after user clicks on download button on the webpage, some thing
> like   File Chooser appears,user selects the file and clicks the save
> button.
> File should be saved into the client system at specified location. Any
>  samples or examples with JSF/Backing Bean  would be very helpful.
>
> Environment:- JSF, SPRING , WEBSPHERE 6.1 RAD 7.0
>
> Thanks
> Krishna
> ________________________________
> From: Nutulapati, Krishna [mailto:KNutulapati@ussco.com]
> Sent: Wednesday, September 17, 2008 12:50 PM
> To: MyFaces Discussion
> Subject: how to download a file using JSF
>
> Hello All,
> Can any one help me on how to  download a file into client system using JSF.
> Soon after user clicks on download button on the webpage, some thing
> like   File Chooser papers,user selects the file and clicks the save button.
> File should be saved into the client system at specified location. Any
>  samples or examples with JSF/Backing Bean  would be very helpful.
>
> Environment:- JSF, SPRING , WEBSPHERE 6.1 RAD 7.0
>
> Thanks
> Krishna
>
>
>
>
>



-- 
--------------------------------------
Standing Bear Has Spoken
--------------------------------------

RE: how to download a file using JSF

Posted by Guy Bashan <gu...@gmail.com>.
Hi,

 

If I understand you correct, all you want is simply to allow user to
download a file.

Why not simply make a link to the resource you are wishing to download. When
there is a link to that resource, the rest is by the hand of the browser.

 

Guy. 

 

From: Nutulapati, Krishna [mailto:KNutulapati@ussco.com] 
Sent: Wednesday, September 17, 2008 8:54 PM
To: MyFaces Discussion
Subject: RE: how to download a file using JSF

 

Hello All,

Can any one help me on how to  download a file into client system using JSF.


Soon after user clicks on download button on the webpage, some thing like
File Chooser appears,user selects the file and clicks the save button. 

File should be saved into the client system at specified location. Any
samples or examples with JSF/Backing Bean  would be very helpful. 

 

Environment:- JSF, SPRING , WEBSPHERE 6.1 RAD 7.0

 

Thanks

Krishna

 

  _____  

From: Nutulapati, Krishna [mailto:KNutulapati@ussco.com] 
Sent: Wednesday, September 17, 2008 12:50 PM
To: MyFaces Discussion
Subject: how to download a file using JSF

Hello All,

Can any one help me on how to  download a file into client system using JSF.


Soon after user clicks on download button on the webpage, some thing like
File Chooser papers,user selects the file and clicks the save button. 

File should be saved into the client system at specified location. Any
samples or examples with JSF/Backing Bean  would be very helpful. 

 

Environment:- JSF, SPRING , WEBSPHERE 6.1 RAD 7.0

 

Thanks

Krishna

 

 

 

 

 


RE: how to download a file using JSF

Posted by "Nutulapati, Krishna" <KN...@ussco.com>.
Hello All,
Can any one help me on how to  download a file into client system using
JSF. 
Soon after user clicks on download button on the webpage, some thing
like   File Chooser appears,user selects the file and clicks the save
button. 
File should be saved into the client system at specified location. Any
samples or examples with JSF/Backing Bean  would be very helpful. 
 
Environment:- JSF, SPRING , WEBSPHERE 6.1 RAD 7.0
 
Thanks
Krishna

________________________________

From: Nutulapati, Krishna [mailto:KNutulapati@ussco.com] 
Sent: Wednesday, September 17, 2008 12:50 PM
To: MyFaces Discussion
Subject: how to download a file using JSF


Hello All,
Can any one help me on how to  download a file into client system using
JSF. 
Soon after user clicks on download button on the webpage, some thing
like   File Chooser papers,user selects the file and clicks the save
button. 
File should be saved into the client system at specified location. Any
samples or examples with JSF/Backing Bean  would be very helpful. 
 
Environment:- JSF, SPRING , WEBSPHERE 6.1 RAD 7.0
 
Thanks
Krishna