f



JSP File Upload

How do I retrieve a file that user has uploaded using a form in HTML.
0
5/25/2008 5:44:17 PM
comp.lang.java.programmer 52714 articles. 1 followers. Post Follow

3 Replies
12507 Views

Similar Articles

[PageSpeed] 48

Chase Preuninger wrote:
> How do I retrieve a file that user has uploaded using a form in HTML.

What upload component are you using ?

If you have not made any such decision, then maybe the
MyFaces Tomahawk one was a solution.

See:
   http://www.onjava.com/pub/a/onjava/2005/07/13/jsfupload.html

Arne
0
arne6 (9808)
5/25/2008 7:22:55 PM
Arne Vajhøj wrote:
> Chase Preuninger wrote:
>> How do I retrieve a file that user has uploaded using a form in HTML.
> 
> What upload component are you using ?
> 
> If you have not made any such decision, then maybe the
> MyFaces Tomahawk one was a solution.
> 
> See:
>   http://www.onjava.com/pub/a/onjava/2005/07/13/jsfupload.html

Which in turn uses Apache Commons FileUpload,
<http://commons.apache.org/fileupload/>

That library can be used in a custom servlet for "by-hand" JSPs, but I think 
Arne's solution is better.  Tomahawk is a good library.

-- 
Lew
0
conrad1 (278)
5/26/2008 2:00:29 AM
Lew wrote:
> Arne Vajhøj wrote:
>> Chase Preuninger wrote:
>>> How do I retrieve a file that user has uploaded using a form in HTML.
>>
>> What upload component are you using ?
>>
>> If you have not made any such decision, then maybe the
>> MyFaces Tomahawk one was a solution.
>>
>> See:
>>   http://www.onjava.com/pub/a/onjava/2005/07/13/jsfupload.html
> 
> Which in turn uses Apache Commons FileUpload,
> <http://commons.apache.org/fileupload/>
> 
> That library can be used in a custom servlet for "by-hand" JSPs, but I 
> think Arne's solution is better.  Tomahawk is a good library.

When I replied then I actually read the subject line as JSF not JSP.

If it is pure JSP, then Apache Commons FileUpload is rather simple
to use, but not quite as flexible as the COS upload.

Arne
0
arne6 (9808)
5/26/2008 2:06:39 AM
Reply: