File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes struts file upload Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts file upload" Watch "struts file upload" New topic
Author

struts file upload

Ram Gouda
Greenhorn

Joined: Feb 18, 2006
Posts: 4
Hi Friends,
I am trying to write programme Struts Action class for file upload using Struts and Jsp and unix.I want to upload a file from local system and save it in server.Please help me in writing code.

Thanks
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Going to move this to the Web Frameworks / Struts forum.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Also, "Ram B" Please click on the My Profile link above and change your display name to meet the JavaRanch Naming Policy of using your real first and real last names.

Thanks, and good luck. The struts forum will answer your question quickly.

Mark
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
If you search the Internet for "struts upload file" you will find some good info...more than I could type here. Here is one hit that looks pretty good:

http://www.roseindia.net/struts/strutsfileupload.shtml

- Brent
Ram Gouda
Greenhorn

Joined: Feb 18, 2006
Posts: 4
Thanks you very much Brent. I get the file and details of the file.It displays to console. But I can not save the file in external location. I need to use output stream.

Ram
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
I do not have any example code for doing this (in my case I store the uploaded files into the database). Check the thread "Uploaded file's default location" for a few tips.

- Brent
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: struts file upload
 
Similar Threads
Regarding Upload a file
How can I upload a File using Struts
upload file using struts tag
How can i upload a file using Struts
Using struts 1.2 how to upload a file into database and download it