This discussion is archived
2 Replies Latest reply: Jan 23, 2013 5:16 AM by gimbal2 RSS

Write a file to SFTP Server

985432 Newbie
Currently Being Moderated
Hi experts,

I'm using EJB 3.1 and JBOSS 7.1.. Is it possible to create and write a file(CSV) directly to SFTP server?

Regards
  • 1. Re: Write a file to SFTP Server
    Kayaman Guru
    Currently Being Moderated
    Get a SFTP library and see for yourself.
  • 2. Re: Write a file to SFTP Server
    gimbal2 Guru
    Currently Being Moderated
    user2000609 wrote:
    Hi experts,

    I'm using EJB 3.1 and JBOSS 7.1.. Is it possible to create and write a file(CSV) directly to SFTP server?
    Yep. I would recommend using JSCH, but that API is seriously lacking in documentation. There is example code in there though, and you can look at the Apache commons-vfs API source which has an SFTP filesystem that uses JSCH. I wouldn't recommend using commons-vfs itself by the way; its not really well designed in my opinion.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points