【tigase-server-7.0.1+tigase-http-api-1.1.0】RestModule can not load directory and groovy form tigase-http-api.jar inside

rongchun luo
Added almost 4 years ago

in the on the line 89,


File scriptsDirFile = new File(scriptsDir);

File[] scriptDirFiles = scriptsDirFile.listFiles();


when running,the scriptDirFiles result is empty

the stackoverflow:

Replies (1)

Added by Wojciech Kapcia TigaseTeam almost 4 years ago file doesn't contain such lines in the mentioned lines. In addition, as documentation informs

In default configuration component will try to start standalone Jetty HTTP Server on port 8080 and add start default modules including RestModule which will add context for REST API in /rest path . RestModule will also load all groovy scripts located in scripts/rest/xxx directories and will bind it to proper action for paths /rest/xxx/. (xxx - is just an example directory name, more than one directory can be used).

So all scripts are read from file system, not the JAR, henceforth I don't see the issue / problem here. Can you elaborate on the issue you are actually experiencing?