• Post Reply Bookmark Topic Watch Topic
  • New Topic

upload folder in jsp  RSS feed

 
ram krishnaa
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can any one please tell me how to upload folde in java.
If we use input type is file it is taking only file but my
requirement is to select folder.

thanks in advance.
 
Nimbal Srivastava
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can't upload folder directly.
but one thing you can do
first of all convert (compress) that folder into zip file using java code and then upload that.

 
chaitanya karthikk
Ranch Hand
Posts: 806
Java MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You cannot directly upload a folder, either you have to manually zip the folder and upload it or you have to use java to zip your folder. for more information

see here
 
Lorand Komaromi
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
anusha chaitanya wrote: for more information

see here


It is important to note that this code has to be run on the client side, it probably won't help ram krishnaa!
 
chaitanya karthikk
Ranch Hand
Posts: 806
Java MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Lorand Komaromi, for remembering me that the code must be run on server side and not on client side.
 
Lorand Komaromi
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ram krishnaa wrote:but my
requirement is to select folder.


You can achieve that with a client side application, a signed java applet or a flash application, you'll find exaples here or here!
 
chaitanya karthikk
Ranch Hand
Posts: 806
Java MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Lorand Komaromi, I will definitely check it, thanks for correcting me.
 
Lorand Komaromi
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
anusha chaitanya wrote:Thank you Lorand Komaromi, I will definitely check it, thanks for correcting me.


Np!
 
Samuel Behrman
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The upload functionality (the file input element) in current browsers does not support this. Therefore it is not possible with a serverside techology.

You can not even try to automate it with DHTML autofilled file input fields either since the element is write protected for obvious security reasons.

You would need more than a little clientside (Java) coding to accomplish something like that.

I'd recommend teaching users to zip their folders (which is easy with a right click on Win) and then upload them. You could then automate the unzipping process of the folder(s) on the server.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!