I need to have access to a properties file from within my java web application. So I would normally put this in my classpath somewhere, and load it using getResourceAsStream("my.properties")
.
I also need to access the same properties file from within javascript. I know I could read this using an XHR if the file exists in the web resources folder, but in this case it does not.
What can I do here? I'm trying to avoid two copies of the file.
Project
- JavaSource
- MyClass.java
- my.properties
- WebContent
- myjavascript.js