I have no idea why this is posted in the JSF forum. But JSF doesn't know/care/interfere with FTP.
It's unclear whether or not the ultimate sources for the filepaths in the example are absolute or relative. If they're relative, they should be made absolute, since there's no such thing as a "current" or "working" directory in a web application. So it would be unpredictable where the files being transferred were expected to be.
Actually, the webapp environment doesn't support stdio, either, so there's no absolutely gurantee where/if System.out.println statements would write. The preferred approach is to use a logger.
Finally, any files read or written by a web application must have access rights for the userid that the web application server runs under. There are no separate userids for web applications.
An IDE is no substitute for an Intelligent Developer.
All of life is a contant education - Eleanor Roosevelt. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database