• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Uploading a directory using JSP/JSF

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello to all,

I want to upload a directory to the server using jsp/jsf component. So, how can I browse to the directory?

Thanks in advance.
 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The contents of the directory or the directory alone ?
 
rajshkhr pandey
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Deepak Bala wrote:The contents of the directory or the directory alone ?



I want to upload the content of the directory with directory.
Suppose there are 20 files in the directory, I want to upload the those 20 file.
 
Saloon Keeper
Posts: 28807
212
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Uploading the directory isn't the problem. Selecting all the files in the directory is. I'm using a RichFaces JSF control to do multi-file uploads, but the user has to select each file individually.

Manual file selection is mandated because making it too automatic would permit people to design malware that bulk-uploaded files with sensitive information in them. The only way I can think of to get around this would be to initiate the uploaded from JavaScript, but JavaScript's sandbox may not permit selection without user interaction for the reason I just gave.

Actually, there's one way that definitely would work, and that's to run a true client-side application such as a Java applet. But in order to make the applet capable of uploading, you'd have to digitally sign it, since unsigned applets aren't allowed to access the user's local filesystem. And getting signed applets accepted by the user's browser is more pain than casual Internet users are generally willing to put up with.
 
There's a city wid manhunt for this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic