I\'m building a Chrome Packaged App. I want to put the script configuration if a config file in a resource directory and on startup want to read that by Javascript.
It is pretty simple with JSF, but you will have to modify the HTML file every time you need a new parameter to be read from JavaScript. My property file (config.properties) in project directory has the following parameter as a key value pair.
parameter.key=parameter.value
The property file name is configured in faces-config.xml
com.example.project.properties.config
configuration
Therefore, you can use a property value in a hidden input inside the HTML file.
And from JavaScript function, use the following line to read the parameter value.
var parameter_value = document.getElementById("parameter_key").value;
Enjoy your day..!!!