Get the path to specific directory in servoy server

Hello, i have a doubt and no have idea to solve it. The question is I’m using JasperReports, and the reports run okey, but my problem not is with the plugin, is with the path to the reports and this is the problem:

The application can run in smart client or in web client. And the path of the record ALLWAYS have to point to the server. If is running in web client we have no problem, because the path is in the same machine o the reports, but if i want to run the application in smart client, the client get the path and not found anything in local machine, for this reason i want to know how can i acces for example to the folder resources of the server. After all i found 2 instructions that can be useful, but i don’t know how can i create a entire path. This are the 2 instructions:

application.getServerURL()
plugins.jasperPluginRMI.reportDirectory

The first get the url to the server, and the last get the reports path, but i don’t know how to join both parts. Thanks for all.

Good morning pentamsi. What is the path for the Jasper reports you have set in the Server properties?

Hello jasantana, nice to see you here.

the path defined in server plugins is: /resources/templates/

And i want from a smart client acces directly to this folder

Is that an absolute path? If so, you can set the file plugin’s servoy.FileServerService.defaultFolder server property to be “/resources/” for example, then you can use plugins.file.getRemoteJSFile(‘/templates/whatever.jrxml’); to get a JSFile to a ‘whatever.jrxml’ file, you can use plugins.file.streamFilesFromServer() and plugins.file.streamFilesToServer(), etc…