Can not load "stimulsoft.properties" from web application
Posted: Tue Sep 18, 2012 1:55 am
Hi,
current version of the library: 2012.2.1332-trial (uploaded today 18/09/2012)
I am using java application as a data provider. Currently I met problem while loading the "stimulsoft.properties" from web resources.
"stimulsoft.properties" is available for application via the class loader as a resource. I decompiled class files and found the following:
class com.stimulsoft.library.ConfigureProperties
Actually this does not work for web application. This method tries to find properties file on the default file folder of the server and does not try to load it from web application itself.
At the first run it recognizes file as missing and write with default one ("defconfigure.properties") from the stimulsoft library to the server public directory. My configuration stayed ignored.
How I can fix the situation?
Best regards
current version of the library: 2012.2.1332-trial (uploaded today 18/09/2012)
I am using java application as a data provider. Currently I met problem while loading the "stimulsoft.properties" from web resources.
"stimulsoft.properties" is available for application via the class loader as a resource. I decompiled class files and found the following:
class com.stimulsoft.library.ConfigureProperties
Code: Select all
private static File getConfigFile(String stimulsoftDir) throws IOException {
File confFile = new File(stimulsoftDir, StiConstants.FILE_NAME_CONFIGURE_PROPERTIES.value);
if (!(confFile.exists())) {
printWarnNoConfProperty();
FileUtil.copyInputStreamToFile(new ResourceApp().getDefaultConfigure(), confFile);
}
return confFile;
}
At the first run it recognizes file as missing and write with default one ("defconfigure.properties") from the stimulsoft library to the server public directory. My configuration stayed ignored.
How I can fix the situation?
Best regards