Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Copy files from directory

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

I am trying to export selected file from /home/user/ejbca/p12/pem folder to /home/user/Desktop/certs folder using a button in a web application. What would be the best way to do this?
 
Nitin Surana
Ranch Hand
Posts: 129
Java Netbeans IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry to say that wouldn't be the best way to do that. One should never use a web-app to do things specific to a machine outside the web-app context. I would recommend to build an application program if you want to do that, or else let the user upload all the files and then you can move it anywhere but only within the web-app context.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65535
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course this can be done from a web application -- as long as the container is running with the permissions to affect the file system.

Normal Java file I/O can accomplish this task.

Nitin Surana wrote:but only within the web-app context.


In fact, it's a poor idea to affect any files within the web context.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!