This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes File Upload Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "File Upload" Watch "File Upload" New topic
Author

File Upload

Arulanand Dayalan
Ranch Hand

Joined: Aug 10, 2005
Posts: 124
Hi All,

Iam using struts. I have Jsp in which i have to attach file and fill in some details and submit and the details would be updated in db. Problem here is i can attach any number of files, on attaching a file the file should be displayed as link with filename and when user clicks the file must be opened.I cant move the file to db untill its submitted, so where i would be storing the file.Can anyone suggest a way to handle this situation.

Regards,
Arul.
Dave Salter
Ranch Hand

Joined: Jul 20, 2005
Posts: 292

You could either store the file in a temporary area on the database or in a temporary directory in the app server.

If the entire upload is complete, you can move the files to permanent storage.
 
 
subject: File Upload
 
Similar Threads
File attachments using Java Mail API
jsp resultset
Hanlde control characters in Servlet
Attach Files
getServletConfig() in a model class?