Specifying FTP Output

The REST service allows a job to specify output to remote files through FTP (File Transfer Protocol). In addition to the repository location, you can specify an FTP server and path where JasperReports Server will write the output files when the job runs. You also need to provide a username and password to access the FTP server.

To specify these parameters, add the outputFTPInfo element to the XML job descriptor, as shown in the following example:

  <description>MyJob description</description>
    <outputFTPInfo>      <serverName>ftpserver.example.com</serverName>      <userName>ftpUser</userName>      <password>ftpPassword</password>      <folderPath>/Shared/Users/ftpUser</folderPath>

FTP output is always specified in addition to repository output, and the output will be written to both the repository and the FTP location. You cannot specify FTP output alone. The file names to be written are the same ones that are generated by the job output, as specified by the baseOutputFilename, sequential pattern if any, and format extensions such as .pdf. Similarly, the file overwrite and sequential filename behavior specified for repository output also apply to FTP output.