aspose file tools*
The moose likes Struts and the fly likes Want a suggestion regarding upload and save in database using struts 2.0 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 "Want a suggestion regarding upload and save in database using struts 2.0" Watch "Want a suggestion regarding upload and save in database using struts 2.0" New topic
Author

Want a suggestion regarding upload and save in database using struts 2.0

vijay jamadade
Ranch Hand

Joined: May 12, 2008
Posts: 235
Hi Friends,

I want to upload multiple .cvs file in database can I do that on single browse button?
Also I want another browse button on the same page for pdf upload which will read the pdf file
and save that file in the database.

Please give me suggestions how it can be done in the struts 2.0?
please help me out.


Regards, Vijay Jamadade.
( Nothing is Impossible.)
Nishan Patel
Ranch Hand

Joined: Sep 07, 2008
Posts: 684

Hi,

You make two separate form for upload file.

User one browse button and give one submit button upload file. Store this file content to session.

Again repeat same as your pdf file.

And finally submit button save all your file.



Thanks, Nishan Patel
SCJP 1.5, SCWCD 1.5, OCPJWSD Java Developer,My Blog
vijay jamadade
Ranch Hand

Joined: May 12, 2008
Posts: 235
Hi Thanks for suggestion.

I implemented that thing, now my requirement is one browse button should be able to select all pdf files in the folder and send that files to the action class in one browse. Right now my browse button for file selection allows me only to select the single file at a time for upload. I want it to be able to select the multiple files.

My question is can we do that? and if yes then how?

Please i need this solution because client requirement does not allow me to add multiple browse for file upload.

Thanks
Nishan Patel
Ranch Hand

Joined: Sep 07, 2008
Posts: 684


Hi,

No, I think it is not possible.


You can upload multiple file but select only one file at a time from browse button.


vijay jamadade
Ranch Hand

Joined: May 12, 2008
Posts: 235
Can anybody suggest some alternate solution for this just like the url below

bulkupload url

can we have this as a solution
vijay jamadade
Ranch Hand

Joined: May 12, 2008
Posts: 235

hey Ranchers,

Please think about this scenario. Tell me your views for this.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
One suggestion would be to write a signed Java Applet to browse the client system and upload multiple files to the server.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Want a suggestion regarding upload and save in database using struts 2.0
 
Similar Threads
Multiple doc upload in single browse click
File Delete using webwork
customization of Browse button in file upload
To upload a file using struts 1.2 and ajax
File upload in Struts