#### Publishing resources from a remote computer

You can publish three types of resources from a remote computer. They are report sets, catalogs, and folders. Before they can be published you must create a zip file or tar file containing the resources to publish. If you want to publish resources from a remote machine to the server, use Publish to Remote Server.

To publish resources from a remote computer:

1. Do either of the following to access the Publish to Remote Server dialog:
   - For administrators, on the JReport Administration > Reports page, browse to the folder where you want to publish the resources, then click the Publish to Remote Server link.
   - For end users, on the JReport Console > Reports page, browse to the folder in which to publish the resources, then click Publish > Publish to Remote Server on the task bar of the Reports page.

   The Publish to Remote Server dialog is then displayed. See the dialog.

2. Click the Browse button to specify the zipped file which contains the resources to publish.
3. Check the Publish files and folders in the zipped file to /XXX without creating a folder with the name of the zipped file box, if you want this option. If this option is checked, go to step 7 directly.
4. Specify a name in the Resource Node Name box. This name is required and is used as the display name of the resource node in the server resource tree.
5. Type a brief description to describe the resources in the Resource Description box.
6. To enable getting resources from a real path, check the Enable Resources from Real Paths option, and then type a path in the Resource Real Path box.

   If you are publishing a folder in the cluster environment, it is recommended that you check the Map Shared Disk option for better performance.

7. To apply an archive policy to the resources you are publishing, check the Apply Archive Policy option, then specify the archive policy as required: Archive as New Version or Replace Old Version.
8. To enable user permissions on the resources, click the Set Permissions link and set the permissions according to your requirements (the Set Permissions link is available only when the resources are to be published to the Public Reports folder). Permissions that can be specified for a user or role include: Visible, Read, Write, Delete, Execute, Schedule, and Grant.
9. If you want to use Advanced Publish, click the Advanced Publish button. All sub folders and report sets contained within the zip file will then be displayed. Check the resources you want to publish and specify the properties for each resource as required.
10. Click OK to start publishing the resources.

Note: When publishing resources from a remote computer, the process is similar to that for a local publish. However, there are differences. They are:

- Local Publish publishes resources from the machine where the server runs, while a Remote Publish publishes resources from a client machine using a web browser to the machine where the server runs.
- The resource type of Remote Publish can ONLY be a compressed file. You should compress the report set and catalog files in advance. There are two approaches to building a compressed file.
  - You can compress the resources manually using a third-party tool, such as Winzip and gzip.
  - You can use jar.exe that the JSDK provides to build a compressed jar file directly. Use the command as follows:

    `%JAVAHOME%\bin\jar.exe -cvfM %DEST_JAR_FILE% %SOURCE_RESOURCES%`

    Parameter | Description
    --- | ---
    %JAVAHOME% | The Java SDK install root.
    %DEST_JAR_FILE% | The destination file path and file name. The .jar file will be generated to the path you specify here, using the file name you provide.
    %SOURCE_RESOURCES% | The source file path and file name. Note that specifying a path for this parameter will cause the generated jar file to contain the same path information. For example, when you extract a jar file compressed using `myReports\*.*` for this parameter, the files will be extracted to a folder called `myReports`. JReport Enterprise Server is not able to import a compressed file which contains the path information, so do not specify a path for this parameter.

    To generate a jar file containing no path information, switch to the source folder, and then carry out the compression. For example,

    `C:\myReports>``C:\j2sdk1.4.1_02\bin\jar -cvfM c:\temp\aa.jar.`

    The jar file will be generated to `c:\temp`, as aa.jar, compressing all the files in `c:\myReports`, and containing no path information.

    Always use this method if the folder you are compressing contains report sets with Chinese, Korean, or Japanese names.