wood burning stoves 2.0*
The moose likes Struts and the fly likes UploadImage Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "UploadImage" Watch "UploadImage" New topic
Author

UploadImage

Adithya Menon
Greenhorn

Joined: Jan 21, 2007
Posts: 19
Hi friends,
I need to upload image file to webserver(and save it) from the
webbrowser using struts.Please help
thanks in Advance
Aditya


SCJP1.4(96%) SCWCD1.4(92%)
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39549
    
  27
On the client side you need a file upload form field, while the server side can be handled be a library like Jakarta Commons FileUpload; see this page for further links.


Ping & DNS - updated with new look and Ping home screen widget
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
In Struts you do this with a combination of the <html:file> tag and a property of type FormFile in your Actionform bean. The best way to learn how to do it is by examining the upload example in the examples war file that comes with the Struts download.


Merrill
Consultant, Sima Solutions
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
There is also a very good article...just go to Google, type in "struts file upload" (no quotes) and click the I'm Feeling Lucky button.

- Brent
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: UploadImage